cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Dorinda
Impactful Individual
Impactful Individual

incompatible types for comparison, These types cant be compared: optionsetvalue, text

I am just getting into using the Dataverse and i have a table that has a choice column called expense type.

 

I want to have a field only show when the choice field is Travel-Day Trips,

 

I am using this code below which I thought would work,

If(DataCardValue4.Selected.Value = "Travel-Day Trips",true, false)

 but I am getting the error.

 

Dorinda_0-1638552476230.png

 

 Any suggestions on how to fix this?

1 ACCEPTED SOLUTION

Accepted Solutions
Nogueira1306
Super User
Super User

Try this:

If(Text(DataCardValue4.Selected.Value) = "Travel-Day Trips",true, false)

 

Nit sure if it will work, though..

 

If you need additional help please tag me in your reply and please like my reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️!

Best regards,
Gonçalo Nogueira

Check my LinkedIn!

Check my User Group (pt-PT)!

Last Post on Community

My website!

View solution in original post

4 REPLIES 4
Nogueira1306
Super User
Super User

Try this:

If(Text(DataCardValue4.Selected.Value) = "Travel-Day Trips",true, false)

 

Nit sure if it will work, though..

 

If you need additional help please tag me in your reply and please like my reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️!

Best regards,
Gonçalo Nogueira

Check my LinkedIn!

Check my User Group (pt-PT)!

Last Post on Community

My website!

Pstork1
Dual Super User
Dual Super User

The problem is that the value of a choice column in Dataverse isn't actually the text that is displayed.  Option columns store their choices in a central location.  So you need to use a loopkup to get the value.  This article explains.

Power Apps Guide - Dataverse - How to filter Dataverse choice columns - Power Apps Guide - Blog



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Dorinda
Impactful Individual
Impactful Individual

@Nogueira1306 Thank you that worked perfect

Dorinda
Impactful Individual
Impactful Individual

@Pstork1 thank you that helps a lot!!

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.

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 (3,196)