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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / TextInput Search Box t...
Power Apps
Answered

TextInput Search Box that I need to filter gallery by Order Number which is a list column

(0) ShareShare
ReportReport
Posted on by 341

I created a search box that I need to filter the gallery by Order Number. Order Number is a list column.

Categories:
I have the same question (0)
  • Verified answer
    Evan_S1 Profile Picture
    341 on at

    I was able to get it to work using the code below.

     

    SortByColumns(Search( Switch(
    btnChoice,
    Vertical,
    Filter('Production Stoppage - DRAFT 1', "Vertical" in Area.Value),
    Modified,
    Filter('Production Stoppage - DRAFT 1', "Modified" in Area.Value),
    QuickShip,
    Filter('Production Stoppage - DRAFT 1', "Quick Ship" in Area.Value),
    Machining,
    Filter('Production Stoppage - DRAFT 1', "Machining" in Area.Value),
    Repairs,
    Filter('Production Stoppage - DRAFT 1', "Repair" in Area.Value),
    Horizontal,
    Filter('Production Stoppage - DRAFT 1', "Horizontal" in Area.Value),
    Shipping,
    Filter('Production Stoppage - DRAFT 1', "Shipping/Receiving" in Area.Value),
    MaterialHandling,
    Filter('Production Stoppage - DRAFT 1', "Material Handling" in Area.Value),
    PaintBooth,
    Filter('Production Stoppage - DRAFT 1', "Paint Booth" in Area.Value),
    ORE,
    Filter('Production Stoppage - DRAFT 1', "ORE" in Responsible.Value),
    Logistics,
    Filter('Production Stoppage - DRAFT 1', "Logistics" in Responsible.Value),
    Purchasing,
    Filter('Production Stoppage - DRAFT 1', "Purchasing" in Responsible.Value),
    Quality,
    Filter('Production Stoppage - DRAFT 1', "Quality" in Responsible.Value),
    'Production Stoppage - DRAFT 1'
    ),SearchBox_2.Text,"OrderNo_x002e_"),"Created",SortOrder.Descending)

  • v-qiaqi@microsoft.com Profile Picture
    on at

    Hi @Evan_S1,

    Delegation issue is normal if you have more than 2000 records in your data source.

    Currently, there is no direct way to solve this issue, the only thing we can do is to use the delegable function or do the pagination thing.

     

    Now to answer your question, SearchBox2.Text ='Order No', which does need to search a specific number you submitted to the 'Order No' column in your SharePoint list.

     

    If you refer to SearchBox2.Text in 'Order No', which needs you input some numbers within the SearchBox2, and Power Apps will retrieve the records that contains the numbers(you input) in the 'Order No'.

  • Evan_S1 Profile Picture
    341 on at

    @v-qiaqi-msft 

    I received a yellow Caution pictured below. Nothing happens when I enter an order number into the search box. The gallery stays as is. is it searching for the word "Order No" instead of needing to search by an actual number submitted to sharePoint list?

    Evan_S1_0-1681995322435.png

    Evan_S1_1-1681995581648.png

     

     

     

  • v-qiaqi@microsoft.com Profile Picture
    on at

    Hi @Evan_S1,

    Here is the thing, you are an expert for your scenario, however I know nothing about your need and some specifal configuration at the very beginning. Especially for some error, we need to trace the source.

     

    I won't give up on this case, thank you for your cooperation so far.😊

     

    Since you want to filter the by order number whether a button is selected or not, please try to filter based on the search box as below:

    Switch(
    btnChoice,
    Vertical,
    Filter('Production Stoppage - DRAFT 1', "Vertical" in Area.Value, "Order No"=SearchBox_2.Text),
    Modified,
    Filter('Production Stoppage - DRAFT 1', "Modified" in Area.Value, "Order No"=SearchBox_2.Text),
    'Quick Ship',
    Filter('Production Stoppage - DRAFT 1', "Quick Ship" in Area.Value, "Order No"=SearchBox_2.Text),
    Machining,
    Filter('Production Stoppage - DRAFT 1', "Machining" in Area.Value, "Order No"=SearchBox_2.Text),
    Repairs,
    Filter('Production Stoppage - DRAFT 1', "Repair" in Area.Value, "Order No"=SearchBox_2.Text),
    Horizontal,
    Filter('Production Stoppage - DRAFT 1', "Horizontal" in Area.Value, "Order No"=SearchBox_2.Text),
    Shipping,
    Filter('Production Stoppage - DRAFT 1', "Shipping/Receiving" in Area.Value, "Order No"=SearchBox_2.Text),
    'Material Handling',
    Filter('Production Stoppage - DRAFT 1', "Material Handling" in Area.Value, "Order No"=SearchBox_2.Text),
    'Paint Booth',
    Filter('Production Stoppage - DRAFT 1', "Paint Booth" in Area.Value, "Order No"=SearchBox_2.Text),
    ORE,
    Filter('Production Stoppage - DRAFT 1', "ORE" in Responsible.Value, "Order No"=SearchBox_2.Text),
    Logistics,
    Filter('Production Stoppage - DRAFT 1', "Logistics" in Responsible.Value, "Order No"=SearchBox_2.Text),
    Purchasing,
    Filter('Production Stoppage - DRAFT 1', "Purchasing" in Responsible.Value, "Order No"=SearchBox_2.Text),
    Quality,
    Filter('Production Stoppage - DRAFT 1', "Quality" in Responsible.Value, "Order No"=SearchBox_2.Text),
    Filter('Production Stoppage - DRAFT 1', "Order No"=SearchBox_2.Text)

    )

     

  • Evan_S1 Profile Picture
    341 on at

    I'm not understanding your question "The key to your issue is that when to filter based on the search box, when btnChoice is blank or filter based on the previous Filter() function at the same time?"

     

    My issue is that I need the search box to filer by order number whether a button is selected filtering tickets by area or if a button is not selected and showing all tickets. The code you provided did not work and made my screen go blank with errors. Error is showing below:

    Evan_S1_0-1681910178265.png

     

  • v-qiaqi@microsoft.com Profile Picture
    on at

    Hi @Evan_S1,

    It is difficult to achieve your need if you are not sure about it.😂

    Okay, here is a situation for your reference:

    If you want to filter the Order Number based on the Area filtering:

    Switch('Production Stoppage - DRAFT 1', 
    btnChoice,
    Vertical,
    Search(Filter('Production Stoppage - DRAFT 1', "Vertical" in Area.Value),SearchBox_2.Text, "Order No"),
    Modified,
    Search(Filter('Production Stoppage - DRAFT 1', "Modified" in Area.Value),SearchBox_2.Text, "Order No"),
    'Quick Ship',
    Search(Filter('Production Stoppage - DRAFT 1', "Quick Ship" in Area.Value),SearchBox_2.Text, "Order No"),
    Machining,
    Search(Filter('Production Stoppage - DRAFT 1', "Machining" in Area.Value),SearchBox_2.Text, "Order No"),
    Repairs,
    Search(Filter('Production Stoppage - DRAFT 1', "Repair" in Area.Value),SearchBox_2.Text, "Order No"),
    Horizontal,
    Search(Filter('Production Stoppage - DRAFT 1', "Horizontal" in Area.Value),SearchBox_2.Text, "Order No"),
    Shipping,
    Search(Filter('Production Stoppage - DRAFT 1', "Shipping/Receiving" in Area.Value),SearchBox_2.Text, "Order No"),
    'Material Handling',
    Search(Filter('Production Stoppage - DRAFT 1', "Material Handling" in Area.Value),SearchBox_2.Text, "Order No"),
    'Paint Booth',
    Search(Filter('Production Stoppage - DRAFT 1', "Paint Booth" in Area.Value),SearchBox_2.Text, "Order No"),
    ORE,
    Search(Filter('Production Stoppage - DRAFT 1', "ORE" in Responsible.Value),SearchBox_2.Text, "Order No"),
    Logistics,
    Search(Filter('Production Stoppage - DRAFT 1', "Logistics" in Responsible.Value),SearchBox_2.Text, "Order No"),
    Purchasing,
    Search(Filter('Production Stoppage - DRAFT 1', "Purchasing" in Responsible.Value),SearchBox_2.Text, "Order No"),
    Quality,
    Search(Filter('Production Stoppage - DRAFT 1', "Quality" in Responsible.Value),SearchBox_2.Text, "Order No"),
    Search('Production Stoppage - DRAFT 1',SearchBox_2.Text, "Order No")
    
    )

     

  • Evan_S1 Profile Picture
    341 on at

    Hi @v-qiaqi-msft,

     

    I'm not sure, I'm still very new to PowerApps and coding/formulas. 

     

    I do have 13 "Area" buttons on the side of the dashboard page that filter the gallery by "Area", I just need to have the search box to search/filter all of them for "Order Number". I just don't know how to add that into my current code.

  • v-qiaqi@microsoft.com Profile Picture
    on at

    Hi @Evan_S1,

    The key to your issue is that when to filter based on the search box, when btnChoice is blank or filter based on the previous Filter() function at the same time?

     

  • Evan_S1 Profile Picture
    341 on at

    I've even tried Search('Production Stoppage - DRAFT 1', SearchBox_2.Text, "Order No") which has worked before, however I am starting to think I have put it within the current code incorrectly.  how would I add this within my current code?

     

    Switch(
    btnChoice,
    Vertical,
    Filter('Production Stoppage - DRAFT 1', "Vertical" in Area.Value),
    Modified,
    Filter('Production Stoppage - DRAFT 1', "Modified" in Area.Value),
    'Quick Ship',
    Filter('Production Stoppage - DRAFT 1', "Quick Ship" in Area.Value),
    Machining,
    Filter('Production Stoppage - DRAFT 1', "Machining" in Area.Value),
    Repairs,
    Filter('Production Stoppage - DRAFT 1', "Repair" in Area.Value),
    Horizontal,
    Filter('Production Stoppage - DRAFT 1', "Horizontal" in Area.Value),
    Shipping,
    Filter('Production Stoppage - DRAFT 1', "Shipping/Receiving" in Area.Value),
    'Material Handling',
    Filter('Production Stoppage - DRAFT 1', "Material Handling" in Area.Value),
    'Paint Booth',
    Filter('Production Stoppage - DRAFT 1', "Paint Booth" in Area.Value),
    ORE,
    Filter('Production Stoppage - DRAFT 1', "ORE" in Responsible.Value),
    Logistics,
    Filter('Production Stoppage - DRAFT 1', "Logistics" in Responsible.Value),
    Purchasing,
    Filter('Production Stoppage - DRAFT 1', "Purchasing" in Responsible.Value),
    Quality,
    Filter('Production Stoppage - DRAFT 1', "Quality" in Responsible.Value),
    'Production Stoppage - DRAFT 1'

    )

  • Evan_S1 Profile Picture
    341 on at

    This is my code below. Am I just putting it in the wrong format? The gallery still goes blank when I try to add the search box filter.

     

    Switch(
    btnChoice,
    Vertical,
    Filter('Production Stoppage - DRAFT 1', "Vertical" in Area.Value),
    Modified,
    Filter('Production Stoppage - DRAFT 1', "Modified" in Area.Value),
    'Quick Ship',
    Filter('Production Stoppage - DRAFT 1', "Quick Ship" in Area.Value),
    Machining,
    Filter('Production Stoppage - DRAFT 1', "Machining" in Area.Value),
    Repairs,
    Filter('Production Stoppage - DRAFT 1', "Repair" in Area.Value),
    Horizontal,
    Filter('Production Stoppage - DRAFT 1', "Horizontal" in Area.Value),
    Shipping,
    Filter('Production Stoppage - DRAFT 1', "Shipping/Receiving" in Area.Value),
    'Material Handling',
    Filter('Production Stoppage - DRAFT 1', "Material Handling" in Area.Value),
    'Paint Booth',
    Filter('Production Stoppage - DRAFT 1', "Paint Booth" in Area.Value),
    ORE,
    Filter('Production Stoppage - DRAFT 1', "ORE" in Responsible.Value),
    Logistics,
    Filter('Production Stoppage - DRAFT 1', "Logistics" in Responsible.Value),
    Purchasing,
    Filter('Production Stoppage - DRAFT 1', "Purchasing" in Responsible.Value),
    Quality,
    Filter('Production Stoppage - DRAFT 1', "Quality" in Responsible.Value),
    'Production Stoppage - DRAFT 1'

    ); Filter('Production Stoppage - DRAFT 1','Order No' in SearchBox_2.Text)

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
Kalathiya Profile Picture

Kalathiya 401

#2
WarrenBelz Profile Picture

WarrenBelz 334 Most Valuable Professional

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 325 Super User 2025 Season 2

Last 30 days Overall leaderboard