Question

How to check the index of the page list in a when condition in Datatransform
My scenario:
ClaimDataPage.ClaimData.CustomerStatusLis()... I need to find whether the subscript of pagelist CustomerStatusList()> 1, then Set Customer status is equal to previous status else blank
-
Reply
-
Accepted Solution

Iterate over the page list ClaimDataPage.ClaimData.CustomerStatusLis() in your data transform or activity and use the pre condition as
.pxListSubscript>1 / Param.pyForEachCount>1
If true continue whens or skip step
In the step set the value of CustomerStatus based on your requirements

If you are iterating on the pagelist then you can use Param.pyForEachCount.
Alternatively you can also use property pxListSubscript to evaluate your when condition.
Accepted Solution

Iterate over the page list ClaimDataPage.ClaimData.CustomerStatusLis() in your data transform or activity and use the pre condition as
.pxListSubscript>1 / Param.pyForEachCount>1
If true continue whens or skip step
In the step set the value of CustomerStatus based on your requirements
sample when Condition :
D_GetRole[UserID:OperatorID.pyUserIdentifier,Role:@pxEvaluateDecisionTable(Param.PageListProperty+"("+.pxListSubscript +")","ABC").pxResults(1).myRecord

In the data transform while looping through the pagelist ClaimDataPage.ClaimData.CustomerStatusLis(), run a when rule/expression where you check .pxListSubscript>1 or Param.pyForEachCount>1. If the result is true then set your required value.

.pxListSubscript>1 do we need to declare something else, this when condition always set to false even when there are CustomerStatusList(1),CustomerStatusList(2),CustomerStatusList(3) are present

You have to use this in context of the pagelist, meaning you have to use the condition inside a loop iterating over the pagelist.
In case .pxListSubscript is not working, try Param.pyForEachCount and see if the pre condition works.

It worked with Param.pyForEachCount.
Thanks