So you need to copy a property from Personnel(1) into FringeBenefits(1) ? Is it always one to one situation?
If yes then I would loop on Personnel() put param.pyForEachCount into another parameter say "param.position" as well as the property "param.myvalue" and then set FringeBenefits(param.position).property.
The code you are using viz. '@String.toInt(param.pyForEachCount)' is correct.
The fact that the value in your tracer is blank but your clipboard has BudgetYear entries is because Pega is unable to find the CONTEXT of the page you are running. Define your BudgetYear in the Pages and Classes in your DT instead of calling it as Primary.BudgetYear in your Step 1.
Thanks Priyabharati for the excellent explanation. Your screenshot with the class structure and the clipboard structure were just amazing! I sincerely hope Pega University hires you for explaining their courses for going to such a deep level of detail to explain to novices!
The diagram below was most helpful in understanding the use of 'DOTS' and the use of 'Append' and 'Last' for the pagelist.
Can you please show me
1. how to get the size of your Packages List and the size of your Entities List on EACH package and also
2. how to use (<CURRENT>) while looping in a DataTransform and not in an Activity?
3. how to use your entities pagelist which is on packages pagelist in a 'TABLE' layout (which has pagelists as a source) where I can use the add item and delete button (instead of activity) to add for example entity two on package four using parameters for determining the length or the size of your individual packages?
1. In an activity you can find the length of pagelist(Packages) as below
2. The below image will help you to find the length of entities pagelist in current packages pagelist using data transform. This image will also help you to understand how to use CURRENT in data transform.
I am adding the image of the expression also
3. You can have a table layout to show package page list. And call a section in master details of the editable grid. In that section make use of Hierarchial table to show entities of each package list. You can add/delete item in this configuration.
I think you might be using inline editing for your embedded tables.
Please use Master Detail and customize your Flow Action to do what Add Item does in Inline Editing. Note that when you use the Flow Actions, PEGA might not show you the correct class in the drop down. Ignore it and save it in the correct class hierarchy (i.e packages and entities) and run it. As long as the sections and flow actions are saved correctly, the context will be pickled up at run time.