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

@LavanyaG3623

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.

@SrijitaB if I use pxListSubscript in a when Condition , what exactly has to be used to refer the pagelist which am looking for… ClaimDataPage.ClaimData.CustomerStatusLis()

@LavanyaG3623

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

@LavanyaG3623

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.

@LavanyaG3623

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.

sample when Condition :

D_GetRole[UserID:OperatorID.pyUserIdentifier,Role:@pxEvaluateDecisionTable(Param.PageListProperty+“(”+.pxListSubscript +“)”,“ABC”).pxResults(1).myRecord

@SohamM95

.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

It worked with Param.pyForEachCount.

Thanks