Finding the Length of an Embedded PageList

I have a pagelist BudgetInformation, BudgetYear and embedded Pagelists Equipment Personnel etc as shown below.

Can you please SHOW me how I can find the length of Equipment Pagelist?

***Moderator Edit-Vidyaranjan: Updated Platform Capability***


Keep up to date on this post and subscribe to comments

August 5, 2019 - 7:40pm



You can use the 'LengthOfPageList' function under the Utilities Library or 'SizeOfPropertyList' function under the Utilities Library or Count function under Default Library to get the size of pagelist property.




August 6, 2019 - 9:57am
Response to Vikash Karn

Hi Vikash,

Can you please SHOW me how to use the function? 

My Equipment Pagelist in embedded on the BudgetYear Pagelist which itself is present in the BudgetDetails class.

I can multiple years, so I need to calculate the size of the Equipment dynamically and I was thinking of passing the year as a parameter.

Also the Equipment Pagelist  itself can have another pagelist. So it is a three level pagelist. If I can find the size of my Equipment pagelist dynamically, I have a reference to that list and I can find the other Pagelists on the Equipment Pagelist. 

Hope you understand my requirement. Looking at my clipboard, can you please show me HOW to use the function.


August 6, 2019 - 12:03pm

I tried using it like this

@LengthOfPageList(pyWorkPage.BudgetInformation.BudgetYear(param.CurrentYear).Equipment) and I was able to get the size when param.CurrentYear is an Integer.

But when I use @LengthOfPageList(.BudgetYear(param.CurrentYear).Equipment) , it doesn't work.

My DT that is calling the above, is in the BudgetInformation class itself. UNLESS I give complete reference including pyWorkPage and then BudgetInformation, it does not give the size of the list. 

Why is the context not being picked up? Any ideas?



August 7, 2019 - 3:37pm
Response to ChakriP8

When you run this function it needs a page where the list is present in the clipboard.

.BudgetYear page list should be passed in the function with some page reference of the clipboard as the data will be in some page in the clipboard.

Just like how the data is in pyworkpage (in pyworkpage you have a pagelist which will have multiple pages).

August 7, 2019 - 4:17pm
Response to ChakriP8

Hi ChakriP8,

From your statement , i can understand that there are three pagelist .

Let's call it as FirstPagelist , SecondPagelist , ThirdPagelist

So the page structure will be as shown in Image

Now , if you are in work context and want to find the Length of Third Pagelist . You have to send #firstpagelist_index and #secondpagelist_index as follows


Now , if you are already in the FirstPagelist context and want to find the Length of ThirdPagelist , you have to pass #secondPagelist_index as follows


There is no need of pyWorkPage reference in the DT as it will automaticallly take the Current Context  (try using Primary is Required)

Let us know if it works.



September 13, 2019 - 4:14pm
Response to ashokk09

Thanks for your reply. My context is not being picked up at run time. What can be the issue? How can I debug CONTEXT issues? I am unable to find the value unless I give the complete path i.e. @LengthOfPageList(pyWorkPage.BudgetInformation.BudgetYear(param.CurrentYear).Equipment),.

September 14, 2019 - 2:34am
Response to ChakriP8

can you please provide a screenshot or document with the Data transform and Pagelist Properties