Update table using WRITE TO DATA STORE ENTITY

Hello All,

 I have a process model where I have to update multiple rows in an entity.

1. First I'm fetching data and based on certain calculations , Im storing it in a process variable.

2. But when I place a "write to data store entity" node after the calculating script task, the process variable gets populated with details of all the rows to be updated

But when I run this process model, it updates only one row at a time ! In order to update the second row, I have to run the process model for the second time.... and so on...

 

Request you to suggest a way that would update all the rows to a single datastore entity on a single-run

 

  Discussion posts and replies are publicly visible

  • Hi Arun,

    It seems the PV is not getting updated. Store the calculated values in new PV and pass the PV to write to datastore entity. hope this helps.
  • Hi Arun,

    Are you fetching all data from DB and performing calculation in Appian ? If so, suggest you to create rule for calculation and filtering of fetched data, storing final value in your PV variable rather than fetching first and than manipulating it and again storing in same variable.

    Please make sure below few point implemented properly,

    1. You have marked Multiple checkbox of Write to data store entity smart service, also check your variable is of multiple type.
    2. Not to map your value variable into saveInto of smart service (Input tab saveInto), rather use Data Output tab.

    If you dont want to create rule for calculation, take an extra variable which stores output of your calculation and map this extra variable in Write to DB smart service value.

    Regards,
    Simple
  • Hi Arun,

    In the Write to Data Store Entity Node, while adding a rule input of type required cdt, multiple checkbox should be checked in order to update/write multiple values. Could you verify if you have done so?

    Thanks,
    Hema