Table layout save button for each row

Hi Team,

We are using Pega 7.3. In table layout for each row we have to display a save icon and I am able to show this icon.

How to implement - on click of save icon in each row, the changes made in that row should be saved to data table (from which the data is fetching).

Please suggest.

Thanks in Advance

Sahul

@Sahul

Try writing an activity on that button to fetch the record by using obj-open or obj-open-by handle methods and then do a property set for the required fields and lastly do an obj-save and commit(using call Work-.commitwitherrorhandling activity).

@HariPriyaY

Thank you so much for suggesting the approach.

Will try and update if it works

@HariPriyaY

Thanks for suggesting the approach. It worked but Obj-Open methods are not required.

Below are the details - ( just for others information)

Requirement:

Display records from a data table on the screen. Each row contains editable controls like dropdown and checkbox. Once user changes the values there should be save button displayed for each row. On click of the save button the values should save in side the DB table.

Solution:

  1. In Section table layout - add icon or button

  2. add on click event on the button, select run activity action. The activity we are giving here will run on context of the row in which we clicked the save button. That is - the row will become the primary page for the activity.

  3. In side the activity → Create an empty clipboard page of same type (same class of the rows in the grid)

  4. Do Property-set into the clipboard page properties from the properties of the Primary page (that is the current row in the grid)

  5. Obj-save, commit