Compare

Certified Senior Developer

Hi All,

I want to compare the record type and a map that have similar data  , I want to compare if it is same then create a list of that fields name.

Thanks

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    You should try this and replace the actual ri! with your record value or parameter.

    a!localVariables(
      local!fields: a!keys(ri!mapData),
      reject(
        fn!isnull,
        a!forEach(
          items: local!fields,
          expression: a!localVariables(
            local!recVal: index(ri!recordData, fv!item, null),
            local!mapVal: index(ri!mapData, fv!item, null),
            if(
              and(
                not(a!isNullOrEmpty(local!recVal)),
                tostring(local!recVal) = tostring(local!mapVal)
              ),
              fv!item,
              null
            )
          )
        )
      )
    )

Reply
  • 0
    Certified Lead Developer

    You should try this and replace the actual ri! with your record value or parameter.

    a!localVariables(
      local!fields: a!keys(ri!mapData),
      reject(
        fn!isnull,
        a!forEach(
          items: local!fields,
          expression: a!localVariables(
            local!recVal: index(ri!recordData, fv!item, null),
            local!mapVal: index(ri!mapData, fv!item, null),
            if(
              and(
                not(a!isNullOrEmpty(local!recVal)),
                tostring(local!recVal) = tostring(local!mapVal)
              ),
              fv!item,
              null
            )
          )
        )
      )
    )

Children
No Data