Is there any way to show only distinct values in Combo box?
Solved! Go to Solution.
Hi @Maheshwari ,
Could you please share more details about the formula you typed within the Items property of the ComboBox?
Based on the needs that you mentioned, please consider take a try with the following workaround:
Set the Items property of the ComboBox to following:
Distinct('Your DataSource', ColumnName).Result
If the ColumnName is a Choice type column, please modify above formula as below:
Distinct('Your DataSource', ColumnName.Value).Result
In addition, I also think GroupBy function could also achieve your needs. Please set the Items property of the ComboBox to following:
GroupBy('Your DataSource', "ColumnName", "GroupData")
then specify the "ColumnName" as Display column value within the ComboBox.
Best regards,
Yes, you can do this by using the DISTINCT function in the Items property of the ComboBox.
Distinct(your_datasource_name, your_column_name)
---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
On the Items of the combobox put:
Distinct (Datasource,ColumnName)
------------
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
yes I have already tried that ,but it doesnot work,it displays only empty tabs.
but it works with dropdown
@Maheshwari
You need to also define the DisplayFields and SearchFields properties like this:
["your_column_name"]
---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
Already tried it..but doesnt work
You'll need to supply more information about the data you used DISTINCT on. Can you please put this code in the OnSelect property of a new button and then post a screenshot of what the resulting collection looks like?
ClearCollect(colTest, Distinct(my_datasource, my_column))
Another idea is to use this code in DisplayMode
["Result"]
---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
Hi @Maheshwari ,
Could you please share more details about the formula you typed within the Items property of the ComboBox?
Based on the needs that you mentioned, please consider take a try with the following workaround:
Set the Items property of the ComboBox to following:
Distinct('Your DataSource', ColumnName).Result
If the ColumnName is a Choice type column, please modify above formula as below:
Distinct('Your DataSource', ColumnName.Value).Result
In addition, I also think GroupBy function could also achieve your needs. Please set the Items property of the ComboBox to following:
GroupBy('Your DataSource', "ColumnName", "GroupData")
then specify the "ColumnName" as Display column value within the ComboBox.
Best regards,
Thank you so much. This really helped me to think over another solution.
User | Count |
---|---|
195 | |
123 | |
86 | |
48 | |
41 |
User | Count |
---|---|
281 | |
163 | |
138 | |
80 | |
76 |