I have Question related to CDT Array. I have two CDT Arrays CDT1 and CDT2 I

I have Question related to CDT Array. I have two CDT Arrays CDT1 and CDT2
I have to compare CDT1.id = CDT2.id
if the ids match then CDT1.value is to be update by CDT2.value

Please let me know if you have any solution.

OriginalPostID-186559

OriginalPostID-186559

  Discussion posts and replies are publicly visible

Parents
  • Bit delayed, but I was thinking more like something below.

    A supporting rule, eg rule!myRule(), with two non-array inputs of CDT1 and CDT2 of the equivalent types:

    type!CDT2(
    value: if(
    isnull(
    ri!CDT1.value
    ),
    ri!CDT2.value,
    ri!CDT1.value
    )
    )

    ...then a call of that rule within an apply, iterating over the arrays of the two types of CDT:

    apply(
    rule!myRule,
    merge(
    local!arrayOfCDT1,
    local!arrayOfCDT2
    )
    )

    You could edit the supporting rule to map any number of fields, conditional or otherwise.
Reply
  • Bit delayed, but I was thinking more like something below.

    A supporting rule, eg rule!myRule(), with two non-array inputs of CDT1 and CDT2 of the equivalent types:

    type!CDT2(
    value: if(
    isnull(
    ri!CDT1.value
    ),
    ri!CDT2.value,
    ri!CDT1.value
    )
    )

    ...then a call of that rule within an apply, iterating over the arrays of the two types of CDT:

    apply(
    rule!myRule,
    merge(
    local!arrayOfCDT1,
    local!arrayOfCDT2
    )
    )

    You could edit the supporting rule to map any number of fields, conditional or otherwise.
Children
No Data