Hi Experts,
I have an app which allows the users to search the sharepoint list for all records. I've added a dropdown (Choices) list so that the user can search based on either just the choice that has been selected from the dropdown or via the choice in the dropdown plus additional criteria entered in a textinput. My current gallery Items code is:
Filter(Installations,
StartsWith(JobNumber, SharePointSearch_5.Text) ||
StartsWith(CustomerSite, SharePointSearch_5.Text) ||
StartsWith(ID, SharePointSearch_5.Text)
)
I wrongly assumed that I could just add another row with the below, can you advise where i've gone wrong please?
StartsWith(Installations, Installers.Value = Dropdown1.Selected.Value)
Thanks in advance!
Hi @Ethan_R,
I need a slight tweak to this code if you're able to help please?
If the dropdown box has "Please select an Installer" then that dropdown box should be ignored from the filtering as the user may just want to use the search box instead, any other selection from the drop down should be used to filter the results.
Hopefully that makes sense?
Thanks in advance
Hi @Ethan_R .
Worked perfectly thank you!
@HectorOlivos thanks for your assistance but that didn't work.
Hi @Dave-ITMan ,
Does this help?
Filter(
Installations,
(
//Show records even if Text field is blank
IsBlank(SharePointSearch_5.Text) ||
StartsWith(JobNumber, SharePointSearch_5.Text) ||
StartsWith(CustomerSite, SharePointSearch_5.Text) ||
StartsWith(ID, SharePointSearch_5.Text)
)
&& (IsBlank(Dropdown1.Selected) || Installers.Value = Dropdown1.Selected.Value)
)
Hello!
Can you try with the next code:
Filter(
Installations,
(StartsWith(JobNumber, SharePointSearch_5.Text) ||
StartsWith(CustomerSite, SharePointSearch_5.Text) ||
StartsWith(ID, SharePointSearch_5.Text)) &&
(Dropdown1.Selected.Value = "" || StartsWith(Installers, Dropdown1.Selected.Value))
)
WarrenBelz
791
Most Valuable Professional
MS.Ragavendar
410
Super User 2025 Season 2
mmbr1606
275
Super User 2025 Season 2