Wrong handling of section parameter
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.
- 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.
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.
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.
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:
The following article link is for the Section Parameters tab to include information about Advanced parameters:
Alternatively, to avoid using parameters, use a property on "pyWorkPage" to hold the value of the parameter.
100% found this useful