You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I do not have a field that contains multiple values separated by a comma, so I went ahead and plucked values out of a column to re create the scenario:
Where "(pluck DepartmentItems "Group")" is the array of values that contain duplicates.
For your script, I would change
{{#with {split fieldname ',') as |tag|}}
to
{{#with (split fieldname ',') as |tag|}}
and
{{#each unique tag}}
to
{{#each (unique tag)}}{{.}},{{/each}}
Hope this helps.
Let me know if it does, or if I need to do something differently.
I didn't know about the ability of "as |item|" until now, but maybe it is just your system that allows it?
Syntax and functionality question - The list I am querying has a field with multiple comma delimited values. I am trying to:
I can do one or the other, split the entry OR get unique, but I can't figure out a way to do both. Is it possible using the provided helpers?
I've tried variations using
{{#each items as |item|}}
{{#with {split fieldname ',') as |tag|}}
{{#each unique tag}}
Any suggestions? Thanks!
The text was updated successfully, but these errors were encountered: