Get unique values of a field

tidA carries [[A]] [[B]] as value of field ‘related’.
tidB carries [[B]] [[C]] [[D]] as values of field ‘related’.

The following code:

<$list filter="[get[sr-related]]">
{{!!title}}<br>
</$list>

produces

A B
B C D

where all are clickable links.

What I want, instead, is

A B C D — all as clickable links.

How do I get that? Something that says merge all results and present only unique values.

Took me a minute to work through all the list operators, but I believe this works the way you want:

<$list filter="[get[related]enlist-input[]unique[]]">
<$link/><br>
</$list>

Relevant materials:

2 Likes

@stobot Yes. It does. Thanks a lot. I had missed the ‘enlist-input’ part.

There is so much to learn about filters and various operators!!

1 Like

There a lot to learn but they are very powerful. In my view a worthwhile investment.

@stobot I love the way you give references to TW documentation! :wink: