Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Filtering a gallery from two independent text input control?

(0) ShareShare
ReportReport
Posted on by

Hi,

 

I have a gallery that is filtered from the text within text input control using the following formula. 

 

Filter('Memberships',StartsWith(Postcode,inp_editmember_membership_search.Text)

 

This filter uses the "Post code" column on the SharePoint list that is providing the data.  What I'd like to do is add a second text input control that will allow the user to search on the "Last Name" column.  The idea is that the user can choose which criteria to search on and the gallery will filter on either box.

 

2023-02-23_17-16-32.jpg

 

This is the formula I'm using but only the "Post code" box is working

 

Filter('Angling Memberships',StartsWith(Postcode,inp_editmember_membership_search.Text) Or StartsWith('Last Name',inp_editmember_membership_search_1.Text))

 

Any hints or tips gratefully received.

  • Rob_CTL Profile Picture
    on at
    Re: Filtering a gallery from two independent text input control?

    Hi @Ethan_R 


    That's perfect, thanks!

  • Verified answer
    Ethan_009 Profile Picture
    4,838 Super User 2025 Season 1 on at
    Re: Filtering a gallery from two independent text input control?

    Hi @Rob_CTL ,

     

    Is this you are trying to achieve?

    Filter(
     'Angling Memberships',
     (IsBlank(inp_editmember_membership_search.Text) || StartsWith(Postcode,inp_editmember_membership_search.Text))
     And 
     (IsBlank(inp_editmember_membership_search_1.Text) || StartsWith('Last Name',inp_editmember_membership_search_1.Text))
    )

     

    Hope this helps

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