cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
milky_bar_may
Helper IV
Helper IV

Combo Box help

Hi everyone, 

 

I have two screens. 

 

The first screen is a combobox. The user selects what they want from the combobox and clicks a button to continue onto the second screen.

 

The second screen is filtered down by whatever was selected in the combobox from screen one. 

 

Is there any select all functionality in the combobox as sometimes the user does not want to filter? 

 

Thanks 

 

3 REPLIES 3
eka24
Super User
Super User

What formula is on the second combobox2?

You can try:

If(IsEmpty(combobox2.SelectedItems), Datasource,Filter(Datasource,Column1=combobox2.Selected.Column2))

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

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-qiaqi-msft
Community Support
Community Support

Hi@milky_bar_may,

Based on the issue that you mentioned, do you want to filter the gallery based on the selected items from Combo Box?

Could you please share more about your scenario, is a SharePoint list Choice column?  How many options could you select in the ComboBox, One or more options?

Combine that with your description, you want to display all the items if there is a select all option. I think that If function can achieve your needs.

I have a test on my side, please take a try as below.

  • Add a choice item named “All” into the Choice column
  • Set the Items property of the Combo Box as below

 

Choices(EventType.Event)​

 

  • Set the Items property of the gallery as below

 

If(ComboBox1.Selected.Value="All",'EventType',Filter('EventType',Event.Value=ComboBox1.Selected.Value))​

 

When you select “All”, the gallery will display all the items which are like unfiltered.

Note: I have a SP list named ‘EventType’ containing a Choice column named  ‘Event’ as my data source.

 

Best Regards,

Qi

Best Regards,
Qi

Hi both, 

 

Thanks for your suggestions. Unfortunately @v-qiaqi-msft , the sharepoint column is a text field rather than a choice column. 

 

The first screen on visible is:

 

ClearCollect(
  NewCollection10,
    Sort(
     Distinct(
       Filter(
         SPlist,
           Created >= Today()
                ),
              Manager
                ),
               Result,
                 Ascending
                         )
                           )

 

The combobox on screen 1 is then equal to collection10. 

 

The final bit on screen 1 is the button to advance to the next screen also has this line of code to set the variable

 

Set(Manager,ComboBox1.SelectedItems.Result)

 

On the second screen I have a second combobox and a gallery. 

 

If(
    CountRows(ComboBox2.SelectedItems) < 1,
    SortByColumns(
        Filter(
            SPList,
            
            Created >= Today(),
            Manager in MySalesManager
        ),
        "CustomerAccount",
        Ascending,
        "SAPOrderNumber",
        Ascending
    ),
    SortByColumns(
       Filter(
            SPList,
            
            Created >= Today(),
            Manager in MySalesManager,
            OrderNumber in ComboBox2.SelectedItems.Result
        ),
        "CustomerAccount",
        Ascending,
        "SAPOrderNumber",
        Ascending
    )

 

 

Still scratching my noggin with this one

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (3,114)