cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
watermaze
Level: Powered On

Search and Filter

Looking to see if its possible to do this.  I have a gallery that filters based upon which button is pressed.  But i would also want to user to be able to do a search.  I currently have it set up like shown below but of course its not working.  I have searched for a solution but coming up short. 

 

Search(Leads,SearchBoxCus.Text,"CustomerName") (Filter(If(type="All",Leads, If(type="Leads being Quoted", Filter(Leads,Status="Quoting internal review" Or Status="Quoting"), If(type="New Leads", Filter(Leads, Status="New"), If(type="Leads Waiting on Cus.", Filter(Leads, Status="Waiting on Customer"), If(type="Leads Waiting to Schedule", Filter(Leads, Status="Waiting to Schedule"), If(type="Leads converted to Jobs", Filter(Leads, Status="Job Awarded"), If(type="Leads closed", Filter(Leads, Status="Closed (Dead Lead)"), ))))))))

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Search and Filter

Hi @watermaze ,

Based on the needs that you mentioned, I think the solution I provided above could achieve your needs.

 

On your side, please set the Items property of the TicketsGallery to following (modify your formula as below):

If(
   !IsBlank(SearchBoxCus.Text),                      /* <-- Add formula here */
   Search(Leads, SearchBoxCus.Text, "CustomerName"),        /* <-- Add formula here */
   type="All",
   Leads,
   type="Leads being Quoted",
   Filter(Leads,Status="Quoting internal review" Or Status="Quoting"),
   type="New Leads",
   Filter(Leads, Status="New"),
   type="Leads Waiting on Cus.",
   Filter(Leads, Status="Waiting on Customer"),
   type="Leads Waiting to Schedule",
   Filter(Leads, Status="Waiting to Schedule"),
   type="Leads converted to Jobs",
   Filter(Leads, Status="Job Awarded"),
   type="Leads closed",
   Filter(Leads, Status= "Closed (Dead Lead)" )
)

Set the OnSelect property of your left Gallery to following:

Reset(SearchBoxCus)   /* <-- Clear Text within your Search box when you click left Gallery items */

Please take a try with above solution, check if the issue is solved.

 

If you have solved your problem, please go ahead to click "Accept as Solution" to identify this thread has been solved.

 

Best regards,

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.
5 REPLIES 5
watermaze
Level: Powered On

Re: Search and Filter

As a follow up.  So the data is displayed on the right.  I want what is shown to either be generated by the buttons on the left or through the seach box. 

 

pg1.png

Community Support Team
Community Support Team

Re: Search and Filter

Hi @watermaze ,

Do you create an app using Service Desk template app?

Do you want the data to be shown in the right Gallery via clicking the left buttons or type search text in SearchBox?

 

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

 

3.JPG

On your side, please set the Items property of the TicketsGallery to following (modify your formula as below):

If(
   !IsBlank(SearchBoxCus.Text),                      /* <-- Add formula here */
   Search(Leads, SearchBoxCus.Text, "CustomerName"),        /* <-- Add formula here */
   type="All",
   Leads,
   type="Leads being Quoted",
   Filter(Leads,Status="Quoting internal review" Or Status="Quoting"),
   type="New Leads",
   Filter(Leads, Status="New"),
   type="Leads Waiting on Cus.",
   Filter(Leads, Status="Waiting on Customer"),
   type="Leads Waiting to Schedule",
   Filter(Leads, Status="Waiting to Schedule"),
   type="Leads converted to Jobs",
   Filter(Leads, Status="Job Awarded"),
   type="Leads closed",
   Filter(Leads, Status= "Closed (Dead Lead)" )
)

More details about If function, please check the following article:

If function

 

Best regards,

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
watermaze
Level: Powered On

Re: Search and Filter

Yes I made and modified the app from the service desk template. I want to show the data on the right gallery when user clicks buttons on the left. I had that part working. Alternatively I want the user to have the option to filter by customer name via the search text box and show the data on the gallery to the right.
Community Support Team
Community Support Team

Re: Search and Filter

Hi @watermaze ,

Based on the needs that you mentioned, I think the solution I provided above could achieve your needs.

 

On your side, please set the Items property of the TicketsGallery to following (modify your formula as below):

If(
   !IsBlank(SearchBoxCus.Text),                      /* <-- Add formula here */
   Search(Leads, SearchBoxCus.Text, "CustomerName"),        /* <-- Add formula here */
   type="All",
   Leads,
   type="Leads being Quoted",
   Filter(Leads,Status="Quoting internal review" Or Status="Quoting"),
   type="New Leads",
   Filter(Leads, Status="New"),
   type="Leads Waiting on Cus.",
   Filter(Leads, Status="Waiting on Customer"),
   type="Leads Waiting to Schedule",
   Filter(Leads, Status="Waiting to Schedule"),
   type="Leads converted to Jobs",
   Filter(Leads, Status="Job Awarded"),
   type="Leads closed",
   Filter(Leads, Status= "Closed (Dead Lead)" )
)

Set the OnSelect property of your left Gallery to following:

Reset(SearchBoxCus)   /* <-- Clear Text within your Search box when you click left Gallery items */

Please take a try with above solution, check if the issue is solved.

 

If you have solved your problem, please go ahead to click "Accept as Solution" to identify this thread has been solved.

 

Best regards,

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.
watermaze
Level: Powered On

Re: Search and Filter

works exactly as I wanted.  Thank you!!!!!

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

SixthImage

Power Summit Australia 2019

August 20-23rd 2019

Users Online
Currently online: 196 members 4,579 guests
Please welcome our newest community members: