Pattern for showing tags in table

My database have tables for tags (with id and name as fields), and my client tables has an array of integers, with the id's of the tags associated with that client. One client can have multiple tags.

In a Retool table, how do I show the tag names? I can't refer to a 'getTags' query in the table column mapped value field. I could possibly change the 'getData' query to join with the tags table and get the names, but when I do it, i get multiple entries per client (e.g. a client with two tags is shown twice in the Retool table).

Found it -
using the following:

{{ => formatDataAsArray( => === i)).map(x => x.tag_name).toString() }}

1 Like