I have a table with the list of records sourced from the Report definition / Data page. We can edit the rows in that table. Let’s say we modify a record / set of records and click on the save button. The requirement here is to save only the records which are modified. Upon clicking the save button again I should the updated records from the same source (data page / report)
Note: There is no checkbox / other control in the table to identify the modified records.
One of the way is to introduce two different data pages one configured as read-only and second one configured as editable. You will create a populate data transform for editable data page. This populate DT is going to copy for each pxResults items from read only data page to editable’s pxResults.
Introduce another data transform which is going to find an initial state of the item from read only data page’s pxResults via @IndexInPageList function with pzInsKey of editable instance from the matching instance of pxResults of read-only datapage and then compare the property values (you can introduce when rule to encapsulate your comparisons) among editable and read-only instances. If values are not matched, append editable current page item via @GetStepPageReference() function to some temp page’s (lets say itemChangedByBUPg) pxResults property. Beginning of DT, If item already in temp page’s pxResults delete it first and then append current page to avoid duplicates.
Configure an event for each editable field on your table and associate your compare dt with it.
Finally, you can iterate over your temp page’s pxResults and save them in db on your post processing activity.
@P.Siva.Praveen You can use Inline editing in Table layout and configure Pre & Post upgrade activities as below.
This configuration doesn’t require another flag/property to track which row is updated. Changes are automatically tracked and committed to DB in real-time.