I have a gallery I am attempting to search by text search box then an optional combobox. The gallery contains a list of devices and the searchbox can filter the list by the device's serial number or device type then the combobox can filter the devices based on their software.
I currently have the following as my code but nothing gets displayed in the gallery.
Filter( Filter( 'Devices', StartsWith( 'Number', TextSearchBox1.Text ) || StartsWith( 'Type'.Value, TextSearchBox1.Text ) ), 'Software'.Value in ComboBox1.SelectedItems.Value )
The data is stored in a sharepoint list. When I only use the text search box to filter the gallery it will work correctly but I cannot get it to work when I add in the combobox.
Any insight as to what I could be doing wrong and how to correct it is apprectiated. Thanks
Solved! Go to Solution.
Hi @gpedone
2 filters are not required here
try
Filter(
'Devices',
(StartsWith(
'Number',
TextSearchBox1.Text
) || StartsWith(
'Type'.Value,
TextSearchBox1.Text
)) && 'Software'.Value in ComboBox1.SelectedItems.Value
)
Regards,
Reza Dorrani
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @gpedone
2 filters are not required here
try
Filter(
'Devices',
(StartsWith(
'Number',
TextSearchBox1.Text
) || StartsWith(
'Type'.Value,
TextSearchBox1.Text
)) && 'Software'.Value in ComboBox1.SelectedItems.Value
)
Regards,
Reza Dorrani
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Thank you for the help, your suggestion helped. I needed to add that into a switch statement to cover the case where the combobox value was blank.
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
203 | |
187 | |
81 | |
50 | |
37 |
User | Count |
---|---|
290 | |
244 | |
122 | |
74 | |
55 |