Alternative for Custom Java Code Functions

@Priyam I asked some of our community about this when rule and hierarachy proble. @kopyp and @AndreasL17691108 kindly suggested two other approaches to looking at data in the level above using when rules:

  1. create data transform which will iterate over list (iterating recursively for embedded lists) and for every item will set property keeping reference to its parent e.g. for 1.2.1: .ParentReference=“pyWorkPage.List(1).List(2)” then use that reference as paramter for function @Utilities.pxCallWhenUsingPage(, .ParentReference, “true”) OR
  2. Slightly evolved version of above without need to keep parent page name persisted: @Utilities.callWhen(tools,“whenRuleName”,@pxGetParentPage(myStepPage))