Error

Hi ,

Can any one help me to fix this error

An error occurred while evaluating expression: cdtMDLRegularLineItem.mrpc2000:a!forEach(items:pv!cdtMDLRegularLineItem.mrpc2000,expression:rule!MDL_GetUserUniqueId(fv!item).ntid) (Expression evaluation error at function a!forEach: Error in a!forEach() expression during iteration 1: Expression evaluation error: “Invalid index: Cannot index property ’’ntid’’ of type String into type List of Variant) (Data Outputs)

  Discussion posts and replies are publicly visible

Parents
  • Here , you are directly referencing the '.ntid'  property from the output of your rule -  MDL_GetUserUniqueId(fv!item).  You get this error if your rule returns either an empty dataset or doesn't have the '.ntid' property. 

    Try using the below code and check if it resolves your issue. 

    a!forEach(
      items: pv!cdtMDLRegularLineItem.mrpc2000,
      expression: property(
        rule!MDL_GetUserUniqueId(
          fv!item
        ),
        "ntid"
      )
    )

Reply
  • Here , you are directly referencing the '.ntid'  property from the output of your rule -  MDL_GetUserUniqueId(fv!item).  You get this error if your rule returns either an empty dataset or doesn't have the '.ntid' property. 

    Try using the below code and check if it resolves your issue. 

    a!forEach(
      items: pv!cdtMDLRegularLineItem.mrpc2000,
      expression: property(
        rule!MDL_GetUserUniqueId(
          fv!item
        ),
        "ntid"
      )
    )

Children
No Data