cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Wauters
Level: Powered On

Filter gallery based on selected dropdown (being an optionset)

I'm using the status OptionSet (Active/Inactive) from an Common Data Service entity called "Damages".

 

The dropdown shows the valid status OptionSet combinations (by using the 'Choices' formula):

image.png

image.png

 

Now, I'd like to filter my gallery based on the selected value in this dropdown.

 

I get various of errors when I try to achieve that filter.

 

  • "Invalid argument type"

image.png

  • "Incompatible type"

image.png

 

Hard-coding the filter, that works.

image.png

 

Just wondering how I can get the OptionSetValue from the selected dropdown so that I can use it in my filter for my gallery?

 

I have tried the following workaround, but this gave me a nasty delegation warning and doesn't feel right nor it didn't seem to work somehow:

 

image.png

Any ideas?

3 REPLIES 3
sopatte
Level 8

Re: Filter gallery based on selected dropdown (being an optionset)

What comes up when you type a dot "." after Status in your Filter?

 

I'm not too familiar with OptionSets but you might need Status.Value or some such. The intellisense when you type the dot should give you a clue.

RezaDorrani
Level 10

Re: Filter gallery based on selected dropdown (being an optionset)

Hi @Wauters 

 

Try the below for the Items property of your gallery

Switch(Dropdown6.Selected.Value,"Active", Filter('Damages',Status = 'Status (Damages)'.Active),"Inactive", Filter('Damages', Status = 'Status (Damages)'.Inactive))

 

Regards,

Reza

Administrator
Administrator

Re: Filter gallery based on selected dropdown (being an optionset)

Thanks for posting in the community @Wauters - can you review the above replies and update the thread if they were helpful? 

 

Thank you,

 

@TopShelf-MSFT 

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

SixthImage

Power Summit Australia 2019

August 20-23rd 2019

Users Online
Currently online: 189 members 4,587 guests
Please welcome our newest community members: