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

If statement with an yes/no option set

Hi everybody

I'm trying to create an if statement in an gallery which shows if ThisItem.Field is Yes or No. Field is an option set where it can be Yes or No. I want to return either "No" or "Yes" depending on what the Field is. 

 

I tried:

If(ThisItem.Field = "No", "No", "Yes")

but I get an error saying Incompatible type. We can't evaluate your formula because the values being compared in the formula aren't the same type. 

 

Can anybody help me with this problem?

 

Best regards

Eva

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Memorable Member
Memorable Member

Re: If statement with an yes/no option set

YesNoColumn is the Field name,

The Same way you mentioned.

If(ThisItem.Field,"Yes","No")

View solution in original post

4 REPLIES 4
Highlighted
Memorable Member
Memorable Member

Re: If statement with an yes/no option set

Hi,

You can Use Like below .

If(ThisItem.YesNoColumn,"Yes","No")

 

Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Please Vote for my idea if you feel, that will help you in the future or good to have in power app.
https://powerusers.microsoft.com/t5/Power-Apps-Ideas/Ability-s-to-Select-Icon-from-UIFabric/idi-p/69...

https://powerusers.microsoft.com/t5/Power-Apps-Ideas/Preview-Mode-for-All-the-Device-Like-Phone-Tabl...

Highlighted
Helper I
Helper I

Re: If statement with an yes/no option set

Hi @VijayTailor 

 

I don't have an column named YesNoColumn

Unless I am misunderstanding your answer

Could you explain it better for me? 

 

Best regards

Eva

Highlighted
Memorable Member
Memorable Member

Re: If statement with an yes/no option set

YesNoColumn is the Field name,

The Same way you mentioned.

If(ThisItem.Field,"Yes","No")

View solution in original post

Highlighted
Helper I
Helper I

Re: If statement with an yes/no option set

Ah yes sorry, I get it now!

Thank you very much, this works 🙂 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (5,992)