Question
IBM
CN
Last activity: 7 Apr 2023 10:18 EDT
how to call a when rule defined in 1st level loop page in 2nd level loop
how to call a when rule defined in 1st level loop page in 2nd level loop?
assume a, b are both page list, in below, "Also use each page as source context" checked box are checked. A when rule IsXXX is defined in class of a.
For Each Page in a
1st level loop body, IsXXX can be called here normally by When command.
1st level loop body, pxGetStepPageReference() can be use to get current page of a.
For Each Page in b
2nd level loop body, IsXXX can NOT be called here by When command.
in 2nd level loop body, I can access properties in class a by get current page of a ,but can not use this to access when rule.
Hi @MaxonL16591286: Logically you can achieve this in multiple ways.
If any conditions to be checked in class a, you can do it in the first loop and set the output in a parameter and can use parameter value in your inner loop.
Use update page option in inner loop using the steppageref captured in outer loop. Do the when rule check inside update page to get the output in a parameter and use it.
Set the required values from outer loop in parameter and use the when rule in inner loop to check parameters instead of properties.
Please help us to understand the use case of the above doesn’t helps.
Thanks.