I am creating a referral tracking app that includes a dropdown list where the user can select the 'Priority' of their entry (high, medium, low). I would like to create a filter or sort option in the gallery so that users can sort based on the Priority of their entry. I am not sure how to achieve this while keeping the SortByColumn Title feature.
What would the funtion be to create a filter/sort button?
Thank you!
Solved! Go to Solution.
Sort(Filter(DataSourceName, ColumnName = Dropdown1.Selected.Value), "Title", If(SortDescending,Descending,Ascending))
Hope this Helps!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
an example
SortByColumns( Filter(datasource, condition ), "columnname", If(SortDescending1,Descending,Ascending) )
Regards,
Reza Dorrani
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Sort(Filter(DataSourceName, ColumnName = Dropdown1.Selected.Value), "Title", If(SortDescending,Descending,Ascending))
Hope this Helps!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Hi @msmartin0014 ,
Could you please share a bit more about the data source you used in your app? Is it a SP list?
Do you want to sort or filter your Gallery items based on the Priority of the entry?
Which column do you used to store the Priority value? Choice type column or Single Text type column?
If you want to Filter or Sort your Gallery Items based on the selected Priority value wihtin the Dropdown box, please take a try with the following workaround:
Add a Dropdown control, set the Items property to following:
["high", "Medium", "Low"]
1. You use Choice type column to store the Priority value:
Set the Items property of the Gallery to following:
SortByColumns(
AddColumns(
Filter(
'YourSPList',
StartsWith(Title, TextSearchBox1.Text),
ChoiceColumn.Value = Dropdown1.Selected.Value /* <-- ChoiceColumn represents the Choice type column in your SP list */
),
"ChoiceValue",
ChoiceColumn.Value
)
"Title", If(SortDescending1, Descending, Ascending),
"ChoiceValue", If(SortDescending1, Descending, Ascending)
)
2. If you use Single Text column to store the Priority value:
Set the Items property of the Gallery to following:
SortByColumns(
Filter(
'YourSPList',
StartsWith(Title, TextSearchBox1.Text),
PriorityColumn = Dropdown1.Selected.Value /* <-- PriorityColumn represents the Text type column in SP List */
),
"Title", If(SortDescending1, Descending, Ascending),
"PriorityColumn", If(SortDescending1, Descending, Ascending)
)
Please take a try with above solution, check if the issue is solved.
Best regards,
User | Count |
---|---|
135 | |
129 | |
76 | |
72 | |
69 |
User | Count |
---|---|
219 | |
136 | |
78 | |
59 | |
53 |