Support Article
Unable to expand grid row after validation error
SA-63525
Summary
A repeat grid is configured with the expand or collapse option. On submitting properties in the grid with invalid values after collapsing the row, error messages display. Hence, unable to expand the row.
Error Messages
Please correct current errors to perform this action.
Steps to Reproduce
- Configure a repeat grid to expand or collapse a row.
- Configure an Integer type property in the grid.
- At runtime, expand a row and provide an invalid value in that property field.
- Collapse the row.
- Submit the flow action. The error message displays. After the error messages are displayed, the row cannot be expanded.
Root Cause
When launching a modal (or) display the flow action for the expand pane in the grid, start with fresh page (that is, without error messages). If there are engine errors, they cannot be cleared and hence the flow action.
Resolution
Perform the following local-change:
- Create a non-auto generated section and add the below code:
<script>
pega.u.d.attachOnload(
function(){
var originalCancelModal=pega.ui.grid.prototype.collapseRowDetails;
pega.ui.grid.prototype.collapseRowDetails=function(e,container, srcElem){
if(jQuery("[id='PegaRULESErrorFlag']").length != 0) return;
originalCancelModal.call(this,e, container, srcElem);
}
});
</script>
- Add this section to the main section where the grid is configured.
The local-change modifies the changeExpandCollapseIconState function for the grids when there are errors.
Add a check before collapsing the grid for the same, if the pyWorkpage page (engine) has errors or not.
Published February 22, 2019 - 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.