I am using a ListBox to search a column in a sharpoint list which works but I would like to be able to Sort and Filter the Browse Gallery Created.
I am using this formula in the item for the gallery.
If("Gagnon" in SelectListBox.SelectedItems.Value, Search('Progress Test 2', "PBGAGNINSL", "resource_code_list"), "Brand" in SelectListBox.SelectedItems.Value, Search('Progress Test 2', "PBBRNDSCAF", "resource_code_list"), "Vics" in SelectListBox.SelectedItems.Value, Search('Progress Test 2', "PBVCH1EQOP", "resource_code_list"))
Gagnon, Brand and Vics being my choices on the list box. Let me know if this is possible or if I should be trying to come at this a different way.
Solved! Go to Solution.
You should be able to apply Filter/SortByColumns to the result of your expression. For example, if you have this expression (which I believe is equivalent to yours):
Search( 'Progress Test 2', If( "Gagnon" in SelectListBox.SelectedItems.Value, "PBGAGNINSL", "Brand" in SelectListBox.SelectedItems.Value, "PBBRNDSCAF", "Vics" in SelectListBox.SelectedItems.Value, "PBVCH1EQOP", "") "resource_code_list")
Then you can apply an additional filter either in the original data source ('Progress Test 2') or in the result of the Search function. For example, this below shows the former:
Filter( Search( 'Progress Test 2', If( "Gagnon" in SelectListBox.SelectedItems.Value, "PBGAGNINSL", "Brand" in SelectListBox.SelectedItems.Value, "PBBRNDSCAF", "Vics" in SelectListBox.SelectedItems.Value, "PBVCH1EQOP", "") "resource_code_list"), AnotherColumn > Value(ValueTextInput))
Or inside the Search function:
Search( Filter('Progress Test 2', AnotherColumn > Value(ValueTextInput.Text)), If( "Gagnon" in SelectListBox.SelectedItems.Value, "PBGAGNINSL", "Brand" in SelectListBox.SelectedItems.Value, "PBBRNDSCAF", "Vics" in SelectListBox.SelectedItems.Value, "PBVCH1EQOP", "") "resource_code_list")
And you can use the SortByColumns on the result of the combined Filter/Search expression, like in the example below:
SortByColumns( Search( Filter('Progress Test 2', AnotherColumn > Value(ValueTextInput.Text)), If( "Gagnon" in SelectListBox.SelectedItems.Value, "PBGAGNINSL", "Brand" in SelectListBox.SelectedItems.Value, "PBBRNDSCAF", "Vics" in SelectListBox.SelectedItems.Value, "PBVCH1EQOP", "") "resource_code_list"), "ColumnToSort", Descending)
You should be able to apply Filter/SortByColumns to the result of your expression. For example, if you have this expression (which I believe is equivalent to yours):
Search( 'Progress Test 2', If( "Gagnon" in SelectListBox.SelectedItems.Value, "PBGAGNINSL", "Brand" in SelectListBox.SelectedItems.Value, "PBBRNDSCAF", "Vics" in SelectListBox.SelectedItems.Value, "PBVCH1EQOP", "") "resource_code_list")
Then you can apply an additional filter either in the original data source ('Progress Test 2') or in the result of the Search function. For example, this below shows the former:
Filter( Search( 'Progress Test 2', If( "Gagnon" in SelectListBox.SelectedItems.Value, "PBGAGNINSL", "Brand" in SelectListBox.SelectedItems.Value, "PBBRNDSCAF", "Vics" in SelectListBox.SelectedItems.Value, "PBVCH1EQOP", "") "resource_code_list"), AnotherColumn > Value(ValueTextInput))
Or inside the Search function:
Search( Filter('Progress Test 2', AnotherColumn > Value(ValueTextInput.Text)), If( "Gagnon" in SelectListBox.SelectedItems.Value, "PBGAGNINSL", "Brand" in SelectListBox.SelectedItems.Value, "PBBRNDSCAF", "Vics" in SelectListBox.SelectedItems.Value, "PBVCH1EQOP", "") "resource_code_list")
And you can use the SortByColumns on the result of the combined Filter/Search expression, like in the example below:
SortByColumns( Search( Filter('Progress Test 2', AnotherColumn > Value(ValueTextInput.Text)), If( "Gagnon" in SelectListBox.SelectedItems.Value, "PBGAGNINSL", "Brand" in SelectListBox.SelectedItems.Value, "PBBRNDSCAF", "Vics" in SelectListBox.SelectedItems.Value, "PBVCH1EQOP", "") "resource_code_list"), "ColumnToSort", Descending)
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
182 | |
52 | |
41 | |
36 | |
30 |
User | Count |
---|---|
242 | |
82 | |
71 | |
69 | |
66 |