Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

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

(0) ShareShare
ReportReport
Posted on 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!  

  • Dave-ITMan Profile Picture
    on at
    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

     

  • Dave-ITMan Profile Picture
    on at
    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. 

  • Verified answer
    Ethan_009 Profile Picture
    4,838 Super User 2025 Season 1 on at
    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)
    )
  • HectorOlivos Profile Picture
    411 on at
    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))
    )

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,679 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,015 Most Valuable Professional

Leaderboard