I’m using a Tagify component to show a user selection of work experience. The data comes from a list of experience categories in the table UserCats. The Tagify side of it all works very well, and the data is stored in a CSV array in the table however, I’d like to show the existing array as tags, preferably without having to show a separate array at the bottom as per:
This page already has an array stored for this section but heres what it looks like on page load::
As with any other input, you need add a value to the tagify, so that it shows the values.
Add dynamic attributes > input > value
Select your query as a value and add the Values formatter to it, using the UI. For the property select the JobsCatID value.
Appreciate that @Teodor - I was confusing myself by making this way more complex than it needed to be. However, when I try the following all the records are shown (I’ve set a limit of 20 tags).
I think I’m almost there, I was using an incorrect path to the array, the array is in UserCats column in the table referenced in the Server Connect ‘scUserDetails’ - this is now showing all records instead of array contents:
Well that’s not an array. There’s a difference between an array and a comma separated string.
The tagify component requires an array, so you need to split the list to an array.
Is it a separate server action which returns these comma separated values? (different than the source for the tagify values?) If yes - is it a single query? Is it a repeat? How do you filter it? Does it return a single record or many records?
Its a single record returned from the security provider identity on a protected page: scUserDetails. The field that contains the CSV list is UsersCats:
The data fed into Tagify comes from a separate table from scWorkCats
UsersCats is a single CSV list eg: 1,32,21,20 which are keys for
JobsCatID