I'm working on an Appian interface for updating a parent table(BaseOilOrConcentrate) which includes a related editable grid of child table(WIW_OIL_SPEC_CONTROLES). I use a rule-backed component (rule!WIW_gridLayout_specs_Oil) to display and manage this grid.
BaseOilOrConcentrate
WIW_OIL_SPEC_CONTROLES
rule!WIW_gridLayout_specs_Oil
When I delete a row from the grid (child spec), it gets removed from the database immediately (which is expected). However, after clicking the Submit button to finalize the update, the deleted child records reappear in the database.
Has anyone encountered a similar situation? Is there a recommended approach to persist deletion state across the interface and process model without modifying the rule?
Thanks in advance for any suggestions!
Discussion posts and replies are publicly visible
Make sure the rule inputs which are passed from the form to process on Submit button action does not have the deleted rows. In this case, the delete might be deleting row from database from interface but some variable still has the deleted row and when in process write to records in done, deleted row is reinserted. So on deletion, remove the row from variable holding entire grid data as well.
The problem is that I can't modify the rule that contains the database deletion logic — rule!WIW_gridLayout_specs_Oil, which is called like this:
rule!WIW_gridLayout_specs_Oil( oilSpecControles: ri!oilSpecControles, isRequired: true, concentreBaseOilId: ri!idBaseoil, deleteFromDB: true )
And in the submit button, I currently only have:
primaryButtons: { a!buttonWidgetSubmit( label: index(local!labels, "submit", {}), style: "PRIMARY", value: true, skipValidation: true ) }
So the issue is that although the row is deleted from the database in the interface, it's still present in ri!oilSpecControles, and when the process writes the data, the deleted row gets reinserted. Since I can't update the rule to also remove the row from the variable, I need an external way to update ri!oilSpecControles before submitting.
ri!oilSpecControles