How to not repeat the same recorde?

i wanna do a list off car brands

and i dont want repeat the same record again like for example i wanna have only audi and volkswagen in the list not audi audi audi audi audi audi then volkswage

i tried UNIQUE_BY_KEY but it give me only one record like you see in the picture, i want audi and volkswagen, so whats the problem i dont inderstand.

Hi, you can find the documentation for the formula here:

In your case you should make it work with:

UNIQUE_BY_KEY(MAP(data.LISTairtabcars, item.fields), "Amarque")

→ First transform the item to just contain the “fields” object, and then choose unique by key with “Amarque” field

1 Like

thank you very much. it worked
i have another question how do i combine this two formulas :

SELECT(data.LISTairtabcars,IF(item.fields.Amarque==params.Amodelepara, true, false))

UNIQUE_BY_KEY(MAP(data.LISTairtabcars, item.fields), “Amodele”)

im curently using only the first formula to show only the proper model for the proper brand but i want to not repeat the same models with the seconde formulas . i know its simple for you but its very hard when your not programer. thanks in advance

i solved it.
SELECT(UNIQUE_BY_KEY(MAP(data.LISTairtabcars, item.fields), “Amodele”), IF(item.Amarque==params.Amodelepara, true, false))

1 Like

Hi, great! Just a pointer, the IF is not really needed here – you can just put item.Amarque==params.Amodelepara , that evaluates to true or false already on its own.

1 Like