web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : 5qXQ7Z4TsSn5eNdTQoMDKi
Power Apps - Building Power Apps
Answered

Filter SharePoint List via TextInput box AND/OR a choices dropdown list

Like (0) ShareShare
ReportReport
Posted on 15 Jun 2023 13:55:53 by

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!  

I have the same question (0)
  • HectorOlivos Profile Picture
    411 on 15 Jun 2023 at 15:03:45
    Re: Filter SharePoint List via TextInput box AND/OR a choices dropdown list

    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))
    )
  • Verified answer
    Ethan_009 Profile Picture
    4,838 Moderator on 15 Jun 2023 at 15:06:02
    Re: Filter SharePoint List via TextInput box AND/OR a choices dropdown list

    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)
    )
  • Dave-ITMan Profile Picture
    on 15 Jun 2023 at 15:13:33
    Re: Filter SharePoint List via TextInput box AND/OR a choices dropdown list

    Hi @Ethan_R .

     

    Worked perfectly thank you! 

     

    @HectorOlivos thanks for your assistance but that didn't work. 

  • Dave-ITMan Profile Picture
    on 28 Jun 2023 at 10:27:30
    Re: Filter SharePoint List via TextInput box AND/OR a choices dropdown list

    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

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 714 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 419 Super User 2025 Season 2

#3
developerAJ Profile Picture

developerAJ 243

Last 30 days Overall leaderboard
Loading started