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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filter gallery using t...
Power Apps
Answered

Filter gallery using textbox

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi Guys,

 

I am trying to figure out how can I filter a gallery using a textbox. 

 

Scenario:

 

I have textbox that cointains different ticket status. When user select a status, the gallery should be filtered by the selected status.

 

Example:

 

User selects status "Pending", Gallery should show all tickets with "Pending" status.

 

Thank in advance 🙂

Categories:
I have the same question (0)
  • TomasZubov Profile Picture
    122 on at

    Hello,

     

     I'm using following in such case 

    In gallery items:
    
    For drop down:
    Filter(<SourceOfGaleryItems>;<TicketStatusField>=Dropdown1.Selected.Value))
    
    For text:
    
    Filter(<SourceOfGaleryItems>;<TicketStatusField>=TextField_1.Text))
  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous,

     

    Could you please share a bit more about the Textbox that you mentioned? Is it a Dropdown control?

     

    I agree with @TomasZubov's thought almost.

     

    If the Textbox that you mentioned is a Dropdown control populated with multiple ticket status, please set the Items property of the Gallery control to following formula:

     

    Filter(YourDataSource,StatusColumn=Dropdown1.Selected.Value)

    Note: The StatusColumn is a column in your data source, which is used to store the status value. But if your data source is a SP list and the StatusColumn is a Choice type column, please take a try with the following formula:

     

    Filter(YourDataSource,StatusColumn.Value=Dropdown1.Selected.Value)

     

    If the Textbox that you mentioned is a TextInput box , please take a try to set the Items property of the Gallery control to following formula:

     

    Filter(YourDataSource,StatusColumn=TextInput1.Text)

    Note: If your data source is a SP list and the StatusColumn is a Choice type column, please take a try with the following formula:

    Filter(YourDataSource,StatusColumn.Value=TextInput1.Text)

     

    Best regards,

    Kris

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @v-xida-msft,

     

    I am currently using the service desk template. What I am trying to figure out is how to filter a gallery based on the selected status.

     

    Thanks 🙂

     

    Capture.PNG

  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous,

     

     

    Do you want to filter the Ticket records (Right Gallery) when you click the Status icon (a Group, consists of Label controls)?

     

    I have made a test on my side, please take a try with the following workaround:15.JPG

     

    16.JPG

     

     

    Set the OnSelect property of the "All tickets" group to following formula:

    UpdateContext({StatusValue:"All"})

    Set the OnSelect property of the "New ticket" group to following formula:

    UpdateContext({StatusValue:"New"})

    Set the OnSelect property of the "In progress" group to following formula:

    UpdateContext({StatusValue:"In progress"})

    Set the OnSelect property of the "Closed" group to following formula:

    UpdateContext({StatusValue:"Closed"})

    Set the OnSelect property of the "On hold" group to following formula:

    UpdateContext({StatusValue:"On hold"})

    Set the Items property of the Gallery control to following formula:

    If(StatusValue="All",Tickets,Filter(Tickets,Status=StatusValue))

    The GIF image as below:Test1.gif

     

     

     

     

    Best regards,

    Kris

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    It's working now @v-xida-msft. Thank you so much 🙂

     

    By the way, I just have another question. Currently I am now able to filter it by "Status", Can I also filter it by the creator of the ticket?

  • alikhan_31 Profile Picture
    15 on at

    I have another problem.

    how we can select multiple records in the same text box with semi-colon separate as we are sending emails to them on the next screen.

    powerapp.jpg

  • nithishguptak Profile Picture
    100 on at

    @v-xida-msft what if I don't have statusvalue as All how can I just show all values when I click on All ? also by default how can I show all values ? 

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 366 Most Valuable Professional

#2
11manish Profile Picture

11manish 184

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 99 Super User 2026 Season 1

Last 30 days Overall leaderboard