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

Filter CDS collection with multiple dropdowns

I have created a collection from a CDS table, and using multiple dropdowns, I'd like to filter it using something like :-

Filter(
'CollApps',
Column1 = Dropdown1.Selected.Value,
Column2 = Dropdown2.Selected.Value,
Column3 = Dropdown3.Selected.Value,
Column4 = Dropdown4.Selected.Value,
Column5 = Dropdown5.Selected.Value
)

Some of the columns are optionset type, and I can't figure out how to translate this from the dropdown values.

This filter works :-

Filter(collApps, 'App Deleted' = 'App Deleted'.No))

but this doesn't

Filter(collApps, 'App Deleted' = "No"))

1 ACCEPTED SOLUTION

Accepted Solutions
CNT
Super User
Super User

@bd528 If you are using Choices, the Items property will be,

Choices('your option set')

 

If you are using Yes/No, the Items property will be,

Choices('column name (your table)')

 

View solution in original post

9 REPLIES 9
CNT
Super User
Super User

@bd528 You are right,

This will work,

Filter(collApps, 'App Deleted' = 'App Deleted'.No))

This will not work, b'coz here you are trying to compare Choices (previously called Option Set) to a Text

Filter(collApps, 'App Deleted' = "No"))

 

If you are using a DropDown your formula will be something like,

Filter(
'CollApps',
Column1 = Dropdown1.Selected.Value,

.....

.....
)

 

If you are using a ComboBox your formula will be something like,

Filter(
'CollApps',
Column1 in Combobox1.SelectedItems,

.....

.....
)

 

Hope this helps!

Filter(
'CollApps',
Column1 = Dropdown1.Selected.Value,

.....

.....
)

 

This doesn't work. PowerApps says the left value is optionset, and the right is text.

@bd528 What is the Items property for the Dropdown?

@bd528 The Items property for the Dropdown/Combobox must be,

Choices('your option set')

[true, false]

@bd528 That won't work.

The Items property for the Dropdown/Combobox must be,

Choices('your option set')

I've changed item for the dropdown to  Choices('App Deleted') and I'm still getting the optionset/text mismatch.

@bd528 Is the Data Type for this Column Choices or Yes/No?

CNT_0-1622908595716.png

 

Could you share a screen shot of the error.

 

CNT
Super User
Super User

@bd528 If you are using Choices, the Items property will be,

Choices('your option set')

 

If you are using Yes/No, the Items property will be,

Choices('column name (your table)')

 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (1,546)