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 / Selecting "All" or Spe...
Power Apps
Answered

Selecting "All" or Specific item in Combobox OnStart

(0) ShareShare
ReportReport
Posted on by 27

Hello Community,

 

I have been working on this PowerApp for awhile and am learning how much of a pain multiple filters are within PowerApps. I have gotten most of the kinks worked out except for the issue below:

 

I need a way to eliminate step 1 in the instructions by loading "All" for each Combobox and connecting it to "AllItems" in the Gallery. I have already added Default = {Value: "All"} with ClearCollect() and Collect() creating the "All" option for each Combobox. I have also connected the "All" selection to the Gallery and it works properly.

My only issue is that users may not want to search all for each Combobox to find what the need even before filtering.

You would think there would be a simple OnStart formula that would remedy this...

 

I appreciate everyone's time!

 

EmilyWinonaIT_0-1595518409227.png

 

Categories:
  • Verified answer
    mdevaney Profile Picture
    29,993 Moderator on at

    @EmilyWinonaIT
    Fortunately, 'All' is not necessary.  You can do the same thing with blank dropdowns using some fancy code like this gallery.

    Filter(
     your_datasource_name,
     ComboBox_ProductTag.Selected=Blank() Or ProductTag=ComboBox_ProductTag.Selected
     And ComboBox_Division.Selected=Blank() Or Division=ComboBox_Division.Selected
     And ComboBox_PrivateFederal.Selected=Blank() Or PrivateFederal=ComboBox_PrivateFederal.Selected
     And Dropdown_Active.Selected=Blank() Or Active=ComboBox_Active.Selected
    )

     
    You would have to change this to match your own control names and data types.

     

    Or you could just take the simple route and change all of the DEFAULT properties for your dropdowns to 'All'.

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

     

  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @EmilyWinonaIT ,

    Regarding the needs that you mentioned, I think it is not necessary to set up a collection to achieve your needs, it's complex. As an direct solution, you could add a extra "All" option to each ComboBox using the Concat function and Split function.

     

    I have made a test on my side, please try the following workaround:

    My Product Type Table data structure as below (only contains one column):

    | Type |
    | ----- |
    | ERP |
    | Dev |
    | Test |
    | Analyze |

    The original options shown up inside the ComboBox as below:

    8.JPG

     

    If you want to add a "All" option to above ComboBox, please set the Items property to following:

    Filter(
     Split(
     "All;" & Concat(ProductType, Type & ";"), 
     ";"
     ), 
     !IsBlank(Result)
    )

    9.JPG

    then set the DefaultSelectedItems property of the ComboBox to following:

    {
     Result: "All" // Result represents the column name you used as Display column name in your ComboBox
    }

    you could try above solution, then apply same logic to other rest of ComboBox.

     

    In addition, if you want to filter your Galley Items based on multiple ComboBox selections, please try the following formula:

    Filter(
     'Your Data Source',
     If(
     IsBlank(ComboBox1.Selected.Result) || ComboBox1.Selected.Result = "All",
     true,
     Field1 = ComboBox1.Selected.Result
     ),
     If(
     IsBlank(ComboBox2.Selected.Result) || ComboBox2.Selected.Result = "All",
     true,
     Field2 = ComboBox2.Selected.Result
     ),
     ...
     ...
    )

    If you select "All" option within all ComboBoxes, the above Gallery would display "All" items without any filtering automatically, you do not need to set up a collection to store the filtered result, and bind it to the Gallery.

     

    Please try above solution, hopes it could solve your problem.

     

    Best regards,

  • mdevaney Profile Picture
    29,993 Moderator on at

    @EmilyWinonaIT 
    I don't believe it is necessary to do all the work as @v-xida-msft is suggesting...  plus you said you did not want an ALL option.

    When the filter is blank it can behave as an ALL option.  Just use a variation of my code and it will work.

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • EmilyWinonaIT Profile Picture
    27 on at

    OK I made a few corrections (mostly adding .Value) and it works...  a little.

    However it seems to be ignoring the other filters and just filters based on the latest selected filter. I need it to show blanks if the three filters together do not product an active result. 

     

    Filter(
    'Marketing Catalog',
    cbProductTag.Selected.Value = Blank() Or ProductTag1.Value = cbProductTag.Selected.Value
    And cbDivision.Selected.Value = Blank() Or Division.Value = cbDivision.Selected.Value
    And cbPrivateFederal.Selected.Value = Blank() Or 'Private/Federal'.Value = cbPrivateFederal.Selected.Value
    And ddActive.Selected.Value ="Yes"
    )

  • Verified answer
    EmilyWinonaIT Profile Picture
    27 on at

    Ahh.. I figured out why it wasn't working right:

     

    Filter(
    'Marketing Catalog',
    (cbProductTag.Selected.Value = Blank() Or ProductTag1.Value = cbProductTag.Selected.Value)
    And (cbDivision.Selected.Value = Blank() Or Division.Value = cbDivision.Selected.Value)
    And (cbPrivateFederal.Selected.Value = Blank() Or 'Private/Federal'.Value = cbPrivateFederal.Selected.Value)
    And (ddActive.Selected.Value ="Yes")
    )

     

    The Or was throwing it off.

     

    THANK YOU!!!

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 402 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 296 Most Valuable Professional

Last 30 days Overall leaderboard