Layout Not getting collapsed
User creates a layout and applies an expand when condition on the layout. When it is expanded, and the condition is set to false, the layout does not collapse even after refreshing the section.
No error message, but the layout stays expanded.
Steps to Reproduce
1. Create a layout and put expand when condition.
2. When it expands, make the condition false and then refresh the section. User observes that the layout does not collapse.
The reported behavior works as expected.
"Expand when" configuration honors the state of layout at design time and executes the when rule only during initial load.
But once the layout is expanded manually or through a server side when condition, it remains in an 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 the user expands the layout manually and expects the layout to remain expanded, irrespective of whether the when condition is true or false. Also developers must keep in mind that this is an expand when condition and not collapse when condition.
"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 condition is true - layout gets expanded and hidden input field is set to true
• If expand when condition is false - design time setting is honored and input field is set to blank
With the initial load, the hidden parameter is set to 'true' and it is never set to false explicitly, the grid always remained expanded on section refresh.
This issue is resolved through the following local-change:
Setting the value of the property to “”, in an activity/data transform step, which is called while refreshing the section.
Note that the value of this hidden input field can be set to the following values:
- Set to False>collapses the layout
- Set to True>Expands the layout
- Blank("") >Execute the evaluate when rule
Published January 31, 2016 - Updated October 8, 2020
Was this useful?
100% found this useful
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.