Example Scenario: I want to display a button element when there are at least 3 rows in a table. In this scenario, I will use below function in when rule
Analysis of Requirement
Table layout can be populated only and only from a Pagelist type of data i.e it can be either pagelist or data page of type pagelist.
It means, if we find out a way to count elements in Pagelist, it simply means number of rows in table as Table layout is just a representation of pagelist.
Solution in Pega Infinity
The solution for applying visibility condition on UI element on basis of count of rows in table is following.
- Identify the Pagelist / Data Page of pagelist type that is used to display table layout.
- On the visibility condition of UI element add when condition , say, IsXYZVisible.
- In this when rule write below condition using expression builder in below format
- Lengthofpagelist(<name of your pagelist>) <condition> <desired count>
For Example. I want to display a button element when there are at least 3 rows in a table. In this scenario, I will use below function in when rule
Lengthofpagelist(<name of your pagelist>) >= 3
0 Comments