Question
5
Replies
3002
Views
Posted: December 17, 2017
Last activity: April 7, 2018
Closed
How to restrict the number rows in repeating layout
Hi, I want to restrict the number of rows in Repeating layout. For example 5 rows are maximum. After completing 5 rows, if user tries to add 6th row I have to display message only 5 rows allowed.
Any suggestions please,
Thanks in Advance.
Hello Rama,
Please review the below discussion on the same requirement:
https://pdn.pega.com/community/pega-product-support/question/restricting-number-rows-repeating-lay-out
Two suggestions given there are:
1.you will be able to use the Disabled? option on the Add a row iconproperties panel. Create a when condition which counts the Page List size and return true or false depending on the business need and place it under Disabled? condition.
Please go through the HasNotes when condition for an example.
(Or)
2.on click of add row icon this "AppendToPageList" activity being called.what you do is create one activity ex: "Test" and call "AppendToPageList" from "Test" activty.in precondition check condition like count>4 continue else skip the step. for this you need to remove the add row icon and you have to provide either URL or button. from button or url call "TEST" activity.
Hope these will be helpful.
Thanks!