Question
Expand When condition fails on Grid
I have given an Expand when condition on the collapsible header of a Repeat Grid. But, its not workinf properly. Once, expanded the Grid layout remains expanded and is not collapsing after refresh.
I found the below solution:
https://pdn.pega.com/support-articles/expand-when-condition-grid-not-triggered-upon-refresh
Can someone help me do the local changes provided in the solution. I am unable to pin point the activity for overriding the param.
Note: I am using Pega 7.2.2
***Updated by moderator: Lochan to add Categories***
Expand when configuration honors the state of layout in design time and executes the when rule only during initial load. But once the layout is expanded manually or through server side when condition, it remains in expanded state for further AJAX requests. It is designed this way to always honor the user preference ahead of the expand when. There may be use cases where in the user expands the layout manually and expects the layout to remain expanded irrespective of whether the when condition is true / false. Also we have to keep in mind that this is expand when condition and not collapse when condition.
How expand when works ?
Expand when is controlled by a hidden input field with name ExpandedSubSectionXXYY (where XX - section name and YY - layout id)
On Initial load,
* If expand when wins - layout will be expanded and hidden input field will be set to true
* If expand when fails - design time setting will be honored and input field will be set to blank
No
Design Time Config
Expand When
Run time (on load)
Hidden input
1
Collapsed
True
Expanded
True
2
Collapsed
False
Collapsed
3
Expanded
True
Expanded
True
4
Expanded
False
Collapsed
For conditions 1 & 3 -> Since the hidden input field is set to true, expand when condition will not be executed after initial load.
For Condition 2 & 4 -> If the user expands the layout manually, then hidden input field will be set to true and hence forth expand when condition will not be executed in server.
Possible Work Around:
Setting hidden input field parameter to,