I have a text box that I am trying to get all combo boxes selected values from a gallery to be in. I can get the Concat function to work but I am having issues on how to incorporate the Distinct to remove the duplicates unless there is another way. How can I remove duplicates using Distinct or another function?
The code I have to Concat is:
Thank you for the help and it works
It gets progressively more complicated, but this is the method I use:
Concat(
Distinct(
Ungroup(
ForAll(
*YourGallery*.AllItems,
*YourComboBox*.SelectedItems
),
Value
),
*Field*
),
Value,
", "
)
Not sure if there's a more efficient way though.
Hope this helps! 🙂
I am and that works for it being a single select combo box. What changes would I need to make for a mulitselect combo box? Might need to know for the future.
To confirm, are you trying to concatenate the values from the combobox within the gallery?
If so, try something like:
Concat(Distinct(*YourGallery*.AllItems, *YourComboBox*.Selected.*Field*), Value, ", ")
^Just throw in your gallery, combobox, and desired field names here.
If it's a multiselect combobox, you'll need to make a couple other changes as well.
Let me know! 🙂
I have tried
hey @kingy61422
have u already tried:
Concat(Distinct('gal New Tasks'.AllItems, 'Tasked Orgs'), Result, "; ")
The Distinct function returns a table with a single column named Result that contains the unique values.
You might need to adapt to your needs.
Let me know if my answer helped solving your issue.
If it did please accept as solution and give it a thumbs up so we can help others in the community.
Greetings
WarrenBelz
146,609
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,946
Most Valuable Professional