All same Id records or Not, true false

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Athensmusic
    Member
    • Feb 2020
    • 51

    All same Id records or Not, true false

    Hi there,
    I have a list of some accountIds,
    those Ids may be same, may be not same.
    how can I get a true/false, that shows if those records are all same Id or not?
    Thanks​
  • lazovic
    Super Moderator
    • Jan 2022
    • 810

    #2
    Hi Athensmusic,

    Try using these formulas (you can test it in the Administration > Formula Sandbox):
    Code:
    $accountIds = list('testId', 'testId', 'testId'); // insert your IDs
    $newArray = array\unique($accountIds);
    
    ifThenElse(
        array\length($newArray) == 1,
        output\printLine('true'),
        output\printLine('false')
        );

    Comment

    • Athensmusic
      Member
      • Feb 2020
      • 51

      #3
      Oh yes, exactly, thanks!

      Comment

      Working...