cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Filter gallery using textbox

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 🙂

1 ACCEPTED SOLUTION

Accepted Solutions

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 Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
TomasZubov
Resolver I
Resolver I

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
Community Support
Community Support

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 Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

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

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 Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Anonymous
Not applicable

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
Frequent Visitor

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

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,432)