About Expression Rule Functions

I have three CDTs that contain some fields with the same value.

I want to create an expression rule that matches them and extracts only the fields that don't overlap.

What function can I use to make it?

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Certified Lead Developer
    in reply to harukio2297

    You need to use nesting of symmetricdifference() function at multiple levels, depending on the number of fields you want to compare.

    Something like following. 

    symmetricdifference(
        symmetricdifference(
            symmetricdifference(local!cdt1.field1,local!cdt2.field1).field2,
            symmetricdifference(local!cdt1.field1,local!cdt2.field1).field2
        ).field3,
        symmetricdifference(
            symmetricdifference(local!cdt1.field1,local!cdt2.field1).field2,
            symmetricdifference(local!cdt1.field1,local!cdt2.field1).field2
        ).field3
    )
    PS. The above code might not be the best possible option, I am thinking out loud here to give you a direction. You may try using symmetricdifference() with the forEach as well.
Children
No Data