web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filter Based on Choice...
Power Apps
Answered

Filter Based on Choice Column

(0) ShareShare
ReportReport
Posted on by 155

Hi,

 

I'm struggling with something that should be super simple:

 

I have a table in CDS with a Choice datatype column.  I'd like to Filter the records in this table based on an ID and specific choice value.

 

So, the table has columns:

Type - Choice column with three choices: "option one"  "option two" and "option three"

OtherId - Text column; foreign key to another table

 

I'd like to perform the following:

Filter('Table Name', OtherId = varForeignKey && Type = "option two")

 

I can't figure this out.  I've tried the following:

Filter('Table Name', OtherId = varForeignKey && Type = Choices(Type.'option two').Value )
Filter('Table Name', OtherId = varForeignKey && Type = Filter(Choices(Type).Value = "option two"))

 

At this point I'm just hacking away at something that really shouldn't be this difficult.

 

Any help would be greatly appreciated.

Categories:
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @dallenap 

    It's difficult because it is not possible to use the optionsets from Dataverse in your formulas like that.

    You would think this would be simple, but, although I don't work with dataverse that much, it is a challenge.

     

    This thread offers a solution/workaround that might be of interest to you.

     

    I hope this is helpful for you.

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @dallenap 

    Shane Young @Shanescows has a 20 min video on how he uses option sets in CDS here:  https://www.youtube.com/watch?v=1L633HIvNGE 

  • dallenap Profile Picture
    155 on at

    @RandyHayes Thanks!  I figured it was something simple.

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 243 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 190 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard