cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Tristan_Falcon
Frequent Visitor

Filter Gallery by Combo Box containing Choice (Option Set)

Been struggling to get my gallery to filter correctly, I mean at all... lol

I have a gallery that needs to be filtered by a few combo boxes. The combo boxes contain items from a choice (option set) tied to the gallery entity as seen below:

Tristan_Falcon_0-1602114917652.png

All of the options show up correctly in the combo box, now I am trying to filter my gallery by these selections but I get the following error, "Invalid Argument Type"

Tristan_Falcon_2-1602115051743.png

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Tristan_Falcon ,

 

The code that filter on OptionSet field should be delegable. The issue is because of the IsBlank() function within Filter() function.

Please modify as follows.

If(
IsBlank(BuildingGalleryStatusCombo.Selected.Value),
LeaseBuildings, 
Filter(LeaseBuildings,'Status (crc10_status)' = BuildingGalleryStatusCombo.Selected.Value)
)

Hope this helps.

Sik

View solution in original post

3 REPLIES 3
v-siky-msft
Community Support
Community Support

Hi @Tristan_Falcon ,

 

I made a test on my side, but I can't reproduce your issue.

It seems there are more than one Status field with the same display name in Entity, please make sure the Status field is chosen correctly.

I recommend you use logic name of status field('crc10_status'), rather than display name('Status (crc10_status)'), to avoid risk.

For example: Choices(LeaseBuildings.'crc10_status')

Then refresh the Entity Connection to see if the issue is fixed.

Sik

Weird, seems to be working ok after logging in today?
But now I need to find a way to make this delegable... 

Hi @Tristan_Falcon ,

 

The code that filter on OptionSet field should be delegable. The issue is because of the IsBlank() function within Filter() function.

Please modify as follows.

If(
IsBlank(BuildingGalleryStatusCombo.Selected.Value),
LeaseBuildings, 
Filter(LeaseBuildings,'Status (crc10_status)' = BuildingGalleryStatusCombo.Selected.Value)
)

Hope this helps.

Sik

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

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