Pre-populate Tagify input

Is there a way to pre-populate choices that have already been chosen previously from the database in Tagify?

I tried setting the value field in dynamic attributes but it will only load one value. I need to set a repeat somehow so that the other data shows up?

Yes, you set the dynamic attributes > value to an array of values that correspond to what you set in the Value Field of the Data properties for the element.

where do I build the array? Server side Or client side?

And my inputs would be first last name and then id
so does array have to look like: name, id, name, id, name, id something like that?
Seems it should be simple but I must be over complicating it.

You need an array with the values.

Here’s just one example that creates an array from a broader data detail.

this_price.data.transhipments.groupBy(`port_id`).keys()

You can also use the flatten modifier when that is available to you.

ah, I got it. My data was already flattened out. And I was trying to use a repeat. All I have to do is pass the ID’s of the data that is already there. Gotcha! I was trying to pass the name and id etc.

Thanks