Forum Discussion
Mez
6 months agoQrew Assistant Captain
I had to solve a similar problem but it was limited to just one field. Since you're joining several fields with a semicolon, this should work nearly the same; keep the formula field using List() as you have, and then trigger the pipeline on new event for mods to this field.
I have two fields on my table: [List of IDs], [Unique list of IDs]
I decided to use pipelines so I could use jinja where unique and sort are available. Here is the code I used taking the raw list of IDs in field [List of IDs] and valuing the other field [Unique list of IDs] with this. Code for the 'update' to this field [Unique list of IDs]. Hope this helps.
{# get unique list of ids from text field with IDs #}
{% if a.list_of_ids %}
{% set ids = namespace(value=[]) %}
{%- set strIds = a.list_of_ids -%}
{% for itm in strIds.split(";") %}
{% set ids.value = ids.value | append(itm) %}
{% endfor %}
{{ (ids.value | unique | sort) | join(",") }}
{% else %}
{% endif %}