cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Dorinda
Post Prodigy
Post Prodigy

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
Community Champion
Community Champion

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
Community Champion
Community Champion

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

Pstork1
Dual Super User III
Dual Super User III

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
Post Prodigy
Post Prodigy

@Nogueira1306 Thank you that worked perfect

@Pstork1 thank you that helps a lot!!

Helpful resources

Announcements
User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

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