Support Article
Pre-populating a row in Repeating grid
SA-29068
Summary
User has configured an activity to pre-fill row values in the repeating grid . But on clicking the add row in the repeating grid, the row is not getting added.
But on explicitly Refresh, could observe that empty row is getting added in the section.
Error Messages
Looking for instance Rule-Message SECTION 'XYZ' EXECUTION ERROR ON PAGE 'PYWORKPAGE' OF CLASS '<objclass>'. : FOR INPUT STRING: "" in the Rule Resolution cache
Steps to Reproduce
1) Configure a section, with a repeat grid.
2) In Operations tab, make it as inline > Click row to edit > Run activity on row add.
3) Configure an activity as below :
This will copy the value entered in the first row, to subsequent rows, on click of 'AddItem'
4) Run the flow
Resolution
In order to pre-populate:
1. Configure "Run activity after grid update" and in the activity have a step with When condition as param.gridAction == "INSERTAFTER"(refer @baseclass.pyPostGridUpdate first and second step) and in step add default values to the row. Activity runs on the newly added row context.
Since this option "Run activity after grid update" is not available in Pega 7.1.5, save-as "@baseclass.pyPostGridUpdate" into grid row class and set default value as in the below screenshot

Published October 25, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.