Skip to main content
craig.m.bauer
May 4, 2023

UNIQUE not working with array returned from MAP

  • May 4, 2023
  • 2 replies
  • 43 views

The following works:
=UNIQUE(ARRAY(1 1 2) => [1 2]
The following does not work:
=UNIQUE(MAP(FLATTEN(SIBLINGS.actions) x => x.owner)) => array with duplicate string values

The MAP returns an array but UNIQUE just ignores it. Does anyone have a solution for this?

    Comments

    craig.m.bauer
    May 4, 2023

    Just figured out a work around for this.
    =UNIQUE(MAP(FLATTEN(SIBLINGS.actions) x => CONCATENATE(x.owner ""))) => Returns Unique Values

    For some reason Concatenating the return value to an Empty String makes UNIQUE work even though it is already a string.
    If anyone knows a better way to make this a string please comment below.

    Karsten B
    Lucid support team
    May 9, 2023

    Hi Craig

    Thanks for posting your workaround. I have noted the confusion here and let our developers know. Let us know if you run into any other issues. 

    -KB