Skip to main content
sameeru0003
April 17, 2023
Question

find the matching row selection data in the list of CDT

  • April 17, 2023
  • 8 replies
  • 0 views

Hi,

local!initProvidersSegment.ServiceLocation.Addresses is my CDT where Addresses is a list of array. In the grid selection i have selection value in local!selection i want to find local!selection in Addresses except one field in local!selection.Action field which is updated and CDT values remains untouched.. Suggest an expression.

    8 replies

    stefanhelzle0001
    Brainy
    April 17, 2023

    Can you go into more detail? I have a hard time understanding what you want to achieve.

    April 17, 2023

    +1 . Would be better if you can share the expression you have tried so that we can get familiar with the locals you have mentioned in the description, otherwise it's a guessing game.

    sameeru0003
    April 17, 2023

    a!forEach(local!initProvidersSegment.ServiceLocation.Addresses, fv!item[where(local!selection.AddressType = fv!item.AddressType,0)]).Action = "P",

    Throws an error:

    Expression evaluation error [evaluation ID = WBZ1N] in rule 'pm_prnupdateform' : Error in a!forEach() expression during iteration 1: Expression evaluation error at function 'where' parameter 1 [line 1146]: Cannot compare incompatible operands of type Map and type PM_PRN_ServiceLocation_AddressesSeg.