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

Gallery filter based on text values

Can I filter a gallery that contains multiple selections (combobox) based on a text values?  My source data has a field with multiple items within, for example items A, B, C, X, Y, Z.  In my text box, if it contains any combination of values that match my source data field I'd like for the source field of 'owner' return in the filter.  Examples:

 

Text box contains A, J, Z = matches at least 1 value (in this case A and Z), show source field 'owner' in gallery.  

Text box contains 1, 2, 3 = no matches, no return therefore not listed in gallery.

Tex box contains A, 1, 2 = matches at least 1 value (in this case A), show source field 'owner' in gallery.

 

Is this possible?  The values within the source field ranges from 0 to 50 (domestic states).  The possibilities within the text box have the same parameters as I am concatinating those text values from a different drop down combobox multi select so there is some sort of uniformity/control.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Gallery filter based on text values

Hi @enlitzinger ,

Could you please share a bit more about your data source? Is it a SP List or a CDS Entity?

Is there a Choice type column in your data source with multiple available options?

Further, do you want to filter your Gallery based on the Text box value?

 

Based on the needs that you mentioned, I think the Filter function could achieve your needs. Please consider take a try with the following workaround:

Set the Items property of the Gallery to following:

Filter(
       'Your SP List data source',
        ChoiceField.Value in Split(
                                    Substitute(TextInput1.Text," ", ""), 
                                    ","
                             )
)

Note: The TextInput1 represents your TextSearchBox, where you could type search text, e.g. A, J, Z. I assume your data source is a SP List.

 

If the data source that you mentioned is a CDS Entity, the Choice field is actually a Option Set type column, you need to modify above formula as below:

Filter(
       'Your SP List data source',
        OptionSetField in Split(
                                    Substitute(TextInput1.Text," ", ""), 
                                    ","
                             ).Result
)

 

Please take a try with above solution, then check if the issue is 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.

View solution in original post

2 REPLIES 2
Highlighted
Community Champion
Community Champion

Re: Gallery filter based on text values

Please watch https://youtu.be/44j2VRbdWjk?t=16

from Reza. It may help you solve it.

 

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.

Highlighted
Community Support
Community Support

Re: Gallery filter based on text values

Hi @enlitzinger ,

Could you please share a bit more about your data source? Is it a SP List or a CDS Entity?

Is there a Choice type column in your data source with multiple available options?

Further, do you want to filter your Gallery based on the Text box value?

 

Based on the needs that you mentioned, I think the Filter function could achieve your needs. Please consider take a try with the following workaround:

Set the Items property of the Gallery to following:

Filter(
       'Your SP List data source',
        ChoiceField.Value in Split(
                                    Substitute(TextInput1.Text," ", ""), 
                                    ","
                             )
)

Note: The TextInput1 represents your TextSearchBox, where you could type search text, e.g. A, J, Z. I assume your data source is a SP List.

 

If the data source that you mentioned is a CDS Entity, the Choice field is actually a Option Set type column, you need to modify above formula as below:

Filter(
       'Your SP List data source',
        OptionSetField in Split(
                                    Substitute(TextInput1.Text," ", ""), 
                                    ","
                             ).Result
)

 

Please take a try with above solution, then check if the issue is 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.

View solution in original post

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 (6,186)