I have 2 screens in my PowerApp, the 1st is a gallery of my dept database, the 2nd is a gallery of the devices within that department, which is filtered by the selection of the first gallery.
I am having trouble filtering that gallery via a txtbox search to find a specific device. I am using an if statement to split so that it will show all devices in that department if the search is left blank. Filtering while the text box is blank works without issue.
This is the code for the 2nd gallery that I have so far.
With(
{item: 'EUD Device DB'},
If(
!IsBlank(txtbox_DevSearch.Text),
Filter(
'EUD Device DB',
Text(DeptBrowseGallery.Selected.'Site ID') = 'Site ID'.Value
<code here>
),
IsBlank(txtbox_DevSearch.Text),
Filter('EUD Device DB',
Text(DeptBrowseGallery.Selected.'Site ID') = 'Site ID'.Value )
)
)
Obviously I am trying to fill in the <code here> part with a working solution to my problem. The text input is called 'txtbox_DevSearch', and the columns I need it to search are 'Map ID', and 'Device Name (PC Name)'
My original design looked like this and this does not work at all.
Filter(
'EUD Device DB',
Text(DeptBrowseGallery.Selected.'Site ID') = 'Site ID'.Value
) && Filter(
'EUD Device DB',
txtbox_DevSearch.Text) StartsWith(
'Map ID',
txtbox_DevSearch.Text
) || StartsWith(
'Device Name (PC Name)',
txtbox_DevSearch.Text
))
Any help with this would be greatly appreciated.

Report
All responses (
Answers (