load( local!modLocs: index(ri!modulesForReview, "toolLocation",{}), local!modStdDescNotNorthAmerica: cast(103,remove(index(ri!modulesForReview, "stdDescription",{}), wherecontains(cons!ICAMS_TOOL_LOCATION_NORTH_AMERICA, touniformstring(local!modLocs)))), /* I am assuming that local!modStdDescNotNorthAmerica stores a list of text. 103 refers to List of Text (String), that is a text array. Casting would be useful when the variables store the values in a different format than the format expected by us. */ local!targetsQueryEntity: a!queryEntity( entity: cons!ICAMS_TARGET_DATA_STORE_ENTITY, query: a!query( filter: a!queryFilter( field: "productType", operator: "in", value: index(local!modStdDescNotNorthAmerica, "productType", {}) ), pagingInfo: a!pagingInfo(1, - 1) ) ), local!targetsByStdDesc: if( rule!APN_isEmpty(local!modStdDescNotNorthAmerica), {}, local!targetsQueryEntity),/*use query entity to get target rows where product type is in the list local!modStdDescrNotNorthAmerica */ or( index(local!targetsByStdDesc, "foreignTradeReviewRequired", {false}) ) )