Support Article
Wrong handling of section parameter
SA-8084
Summary
Parameter values passed to embedded section are not set when the section is refreshed, or used by components that request the parameter after the section was first displayed.
Example
- A grid which uses the value in a "Visible when" condition renders correctly at first, but new rows do not use the parameter value that was set.

- When the section is refreshed the parameter value appears to be lost.
Error Messages
Not Applicable.
Steps to Reproduce
1. Create a section with boolean standard parameter ParamName.
2. Create a grid with some control inside a row.
3. Set control visibility to param.ParamName == 'true'.
4. Include this section in other section, and set ParamName to true.
5. Run the case and add a row.
The control is not visible in newly created rows.
Root Cause
In this case the problem is due to how standard parameters are passed to the section.
When you embed a section inside another and pass the parameter; the parameter values are only passed to the embedded section from the parent section when it is generated.
That means, when the parent section is redrawn or refreshed or in a case when you add a new row to the grid the "isEditable" parameter is no longer available, and so you do not see the icon.
This is the expected behaviour for standard parameters.
Resolution
The solution to this is to use Advanced Parameters which are persisted on the clipboard.
This is a special type of parameter available for sections for these particular scenarios.
Using Advanced Parameters in the background creates a new parameter page specific to the section. And it is further maintained for any kind of refreshes. This is used in several out of the box sections also. For more information, see "Work-.pyActionArea" section.


Reference the parameters using the syntax:
myParamPage.<param name>

The following article link is for the Section Parameters tab to include information about Advanced parameters:
https://pdn.pega.com/sites/default/files/help_v71/procomhelpmain.htm#rule-/rule-html-/rule-html-section/parameters.htm
Alternatively, to avoid using parameters, use a property on "pyWorkPage" to hold the value of the parameter.
Published April 17, 2015 - 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.