Hi Everyone,
I am working on an Editable Grid in Appian where the grid data comes from a Record Type (Employee Request). The record also has a relationship (requestDetails) which contains fields like categoryId, typeId, and referenceNumber.
categoryId
typeId
referenceNumber
For normal fields (like department or location) I can update values using saveInto with the local variable and fv!index. However, when I try to update fields that belong to the relationship object, the values are not saved and I receive errors.
department
location
saveInto
fv!index
Example dropdown:
a!dropdownField( label: "Category", choiceLabels: local!categoryLabels, choiceValues: local!categoryValues, value: fv!item.requestDetails.categoryId, saveInto: { a!save( fv!item.requestDetails.categoryId, save!value ) } )
This results in the error:
The save target must be a local variable that does not refresh on every evaluation, a process variable, or a node input...
I understand that fv!item cannot be used as a save target, so I tried updating using local!gridData[fv!index], but updating the relationship fields still does not work correctly.
fv!item
local!gridData[fv!index]
My Questions:
What is the recommended way to update relationship record fields inside an Editable Grid?
Should the entire parent row be updated using a!update()?
a!update()
Is there a best practice pattern for handling Record Type relationships in editable grids?
Any guidance or working examples would be greatly appreciated.
Thanks in advance!
Discussion posts and replies are publicly visible
Shahid said:What is the recommended way to update relationship record fields inside an Editable Grid?
a!save(local!gridData[fv!index].requestDetails.categoryId, save!value)
Shahid said:Should the entire parent row be updated using a!update()?
No - direct saves work.
Shahid said:Is there a best practice pattern for handling Record Type relationships in editable grids?
Query relationships -> local!data -> nested saves -> batch writeRecords.Recommend go through this documentation once - https://docs.appian.com/suite/help/26.2/recipe-add-edit-and-remove-data-in-an-inline-editable-grid.html