Hi,
In the EDIT mode of the screen data, initially when I load the data my rule input is loading the data into all of fields of the CDT.
When I click on "Add Document", I am trying to use append function. When I select any filed value in the screen, it is resetting the old value of the previously loaded data.
In this case, when you look into ODOCID is getting reset for the previous records.
Is this because of append function.
Please suggest if I have to use to any other function.
Thanks.
Discussion posts and replies are publicly visible
There are couple of issues with your code.
Your add row link logic should be like this
addRowlink: a!dynamicLink( label: "Add Document", value: { type!yourCDT/*The CDT type which you have in rule input */ }, saveInto: { a!save(ri!opinionDocuments, append(ri!opinionDocuments, save!value)) } )
Refer to Appian documentation here https://docs.appian.com/suite/help/22.1/recipe-add-edit-and-remove-data-in-an-inline-editable-grid.html to know how to configure editable grid.
my recommendation as best practice -if you try to append a new value:
a!save( target: local!array, value: append(local!array, 'type!{urn:com:appian:types:example}ex_DataType'()) )