web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filter Gallery by Ente...
Power Apps
Unanswered

Filter Gallery by Entering Multiple Values for Same Column

(1) ShareShare
ReportReport
Posted on by 69
I have an app with a gallery that is filtered with a Starts with that allows the user to enter a the reservation number and all the items in the gallery with that reservation number show in the gallery. From there the user can interact with the items in a number of ways, one of which is to export all the items shown in the gallery to a csv file. (This is basically an "order" and the gallery shows all the items ordered, so each reservation number can have multiple items associated with it.)
My users will be printing labels for all the items they have "pulled" for the customer orders. Sometimes they will create labels for several small orders at one "sitting." The way my app works now, they must export then print the labels one reservation at a time. What I would like to do is make a way for the user to interact with several reservations and them export all the items they worked on to csv at the same time. I thought perhaps they could just enter two or three reservation numbers into the textbox (separated by commas, maybe?) and all of the items associated with the entered numbers would show up in the gallery. However, I haven't been able to find any instructions for that so I'm guessing it isn't possible.
Everything I've seen out there seems to be how to filter using multiple conditions in different column, etc. I am looking for a way to filter for multiple values in the same column - in this case a text column. I am open to any suggestions. Is there a way to make radio boxes with all the unique values in the Reservation number column (which is a text column)?  What is the best way to accomplish this?
I would appreciate any guidance!
 
Categories:
I have the same question (0)
  • SoPatt Profile Picture
    Microsoft Employee on at
    I created the below collection:
    Collect(KeyValuePairs,
        {
            Key: "Key1",
            Value: "Value1_1"
        },
        {
            Key: "Key1",
            Value: "Value1_2"
        },
        {
            Key: "Key2",
            Value: "Value2_1"
        },
        {
            Key: "Key2",
            Value: "Value2_2"
        },
        {
            Key: "Key3",
            Value: "Value3_1"
        },
        {
            Key: "Key3",
            Value: "Value3_2"
        },    
        {
            Key: "Key4",
            Value: "Value4_1"
        },
        {
            Key: "Key4",
            Value: "Value4_2"
        }
    )

    I created two vertical galleries as shown below:
    The left gallery (Gallery3) has a checkbox (CheckBoxCanvas1) and the label on the checkbox is set to "ThisItem.Value" and Items is set to "Distinct(KeyValuePairs,Key)"
     
    The right gallery has a couple labels just to display items in the collection and Items is set to "Filter(KeyValuePairs,Key in Filter(Gallery3.AllItems,CheckboxCanvas1.Checked).Value)".

    You could also do the comma-separated text field (call it TextCanvas2) thing that you mentioned by setting the gallery items to: "Filter(KeyValuePairs,Key in Split(TextCanvas2.Text,","))"
  • CTASS Profile Picture
    69 on at
    SoPatt,
    Thanks for your response! The filter you suggested worked for me as far as searching for more than one value. The statement I used is:
     
    Filter(Tickets4Labels, RESERVE in Split(SearchInput1.Text," ")) 
     
    Now, however, I have a problem reaching my ultimate goal, in that I have an "EXPORT" button set up to run a flow that exports whats in the gallery to a CSV file. This is the "On Success" formula:
     
    ClearCollect(colChildRec,Items4Labels);
    ClearCollect(colExportChild,ShowColumns(Filter(colChildRec,'PARENTID: RESERVE'.Value = SearchInput1.Text),'PARENTID: RESERVE','PARENTID: OUTDATE','PARENTID: JOBNAME','PARENTID: PRINTNAME','PARENTID: NAME','PARENTID: TOTALLABEL',PARENTID,QTYLABELS,CONTAINER,QTYPER,MEMO,'PARENTID: INITIALS'));
    Concurrent(
        Notify("Working on it...",NotificationType.Information),
       Set(csvFileUrl, TicketsandItemsCSV.Run(JSON(colExportChild,JSONFormat.IgnoreBinaryData & JSONFormat.IgnoreUnsupportedTypes)).fileurl
    ));
    Launch(csvFileUrl)
    As you can see, the second ClearCollect statement is looking for the Value (singular) in the SearchInput1 box. Can you think of a way to make it able to read all the values in the box?
     
    Thanks for your help so far!! 
     
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 536

#2
WarrenBelz Profile Picture

WarrenBelz 426 Most Valuable Professional

#3
Haque Profile Picture

Haque 305

Last 30 days Overall leaderboard