cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Community Support
Community Support

Re: Filter gallery using textbox

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
Highlighted
Resolver I
Resolver I

Re: Filter gallery using textbox

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

Re: Filter gallery using textbox

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.
Highlighted
Anonymous
Not applicable

Re: Filter gallery using textbox

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

Highlighted
Community Support
Community Support

Re: Filter gallery using textbox

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

Highlighted
Anonymous
Not applicable

Re: Filter gallery using textbox

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?

Highlighted
Regular Visitor

Re: Filter gallery using textbox

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
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (8,306)