cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JmccoyPeerless
Helper II
Helper II

Filtering a gallery by multiple sources

I have a gallery where I currently have two radio properties that are filtering the gallery exactly as planned. I want to introduce a text box that will search the gallery as well. 

Sort(Filter('[dbo].[Power_HotTagCollect]',TagStatus = Status && AmountFilter = Amount),ID,Descending)

This is the current formula I am using. I added a text box and called it OrderSearch. 

 

Please help!! I imagine I will need to add some sort of if statement. 

1 ACCEPTED SOLUTION

Accepted Solutions
v-yutliu-msft
Community Support
Community Support

Hi @JmccoyPeerless ,

Do you want to filter based on two radios and a textinput?

Could you tell me 

1)the relationship between these three controls? All is "And" ?

2)the field's data type that will be filtered by the textinput?

I assume that:
1)All is "And"

2))the field's data type is text

 

Then try this formula:

Sort(Filter('[dbo].[Power_HotTagCollect]',
             TagStatus = Status && 
             AmountFilter = Amount,
            If(IsBlank(TextInput1.Text),true,fieldname in TextInput1.Text)
             ),ID,Descending)
//replace with the fieldname and textinput name

 

 

 

Best regards,

Community Support Team _ Phoebe Liu
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

4 REPLIES 4
eka24
Super User
Super User

Try

Sort(Filter(Search('[dbo].[Power_HotTagCollect]',OrderSearch.Text,"ColumnForTheSearch"),
TagStatus = Status && AmountFilter = Amount),ID,Descending)

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

v-yutliu-msft
Community Support
Community Support

Hi @JmccoyPeerless ,

Do you want to filter based on two radios and a textinput?

Could you tell me 

1)the relationship between these three controls? All is "And" ?

2)the field's data type that will be filtered by the textinput?

I assume that:
1)All is "And"

2))the field's data type is text

 

Then try this formula:

Sort(Filter('[dbo].[Power_HotTagCollect]',
             TagStatus = Status && 
             AmountFilter = Amount,
            If(IsBlank(TextInput1.Text),true,fieldname in TextInput1.Text)
             ),ID,Descending)
//replace with the fieldname and textinput name

 

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

When trying this option it shows that the search function has invalid arguments. 

Do you want to filter based on two radios and a textinput? Yes, however I would also like the option to reset/default(Whichever would work best) both of the radios so there is no selection. Then Provide the OrderNumber in the text box to pull all incidents with this number regardless of the status and $ amount. 

Could you tell me 

1)the relationship between these three controls? All is "And" ? Not sure what the All is And means. All three of the controls have a direct relationship with the table being filtered. They cover three columns within Power_HotTagCollect Table: OrdNum(Search),Amount(Radio), Status(Radio)

 

The Formula you provided me seems to be working the way I would want it to the only problem is  when I deselect the radios, I can still search and it work. However, say the number amount I am choosing $0 To $100 has a Ordnum 718531 and so does $100 to $500, when I click the button to deselect the radios, the OrdNum searched still only pulls for the last radio selections even though the radios show that have been cleared. So In my case its pulling all OrdNums in the $0 To $100 range and ignoring the ones to $100 to $500. Then if I click on the radio selection $100 to $500 it shows up fine. 

 

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (2,066)