cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
deltaformtech
Helper I
Helper I

Unable to filter gallery based on Yes/No Column in CDS Table

Hello,

 

I have a table in CDS called Dispatches which has two Yes/No columns - Dispatched and Completed.

 

I want to filter Gallery Items, but the following produces an error:  Filter(Dispatches, Completed = true)

deltaformtech_0-1615420607173.png

 

How do I go about evaluating based on the CDS OptionSetValue as opposed to the Boolean type?

 

Thanks in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
deltaformtech
Helper I
Helper I

I found a solution, but would love someone to explain what's going on!

 

I updated the Items property formula to: Filter(Dispatches, Completed = 'Completed (Dispatches)'.Yes)

View solution in original post

2 REPLIES 2
deltaformtech
Helper I
Helper I

I found a solution, but would love someone to explain what's going on!

 

I updated the Items property formula to: Filter(Dispatches, Completed = 'Completed (Dispatches)'.Yes)

v-xiaochen-msft
Community Support
Community Support

Hi @deltaformtech ,

 

This is caused by data type mismatch.

You could also use this formula :

Filter(Dispatches,Completed=LookUp(Choices(Dispatches.Completed),Text(Completed)="Yes").Value)

 

Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Kudoed Authors
Users online (3,411)