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 / IF Yes/No conditions
Power Apps
Answered

IF Yes/No conditions

(0) ShareShare
ReportReport
Posted on by 36

I've been unsuccessfully trying to figure out the syntax for an IF condition based on the value of a Yes/No feild. I cant figure it out how to adapt the examples I see online to what I am working on, I am hoping someone might be able to explain how Yes/No conditions work?

 

The current example I'm working on:

Table name: CreditLimitChanges

Columns:

'AccountName'  -Text column

'Done'  -Yes/No column

Gallery: ListGallery

 

I have created a label, and I want the fill of the label to be Red if Done = No, and White if Done = Yes 

 

I can get it to work with the text column. E.g. this does work:

If(LookUp(CreditLimitChanges, AccountName= ListGallery.Selected.AccountName, AccountName) = "Pfeffer LLC", Red, White)

 

But I can't figure out how to do this with the yes/no column. The help text says value types being compared are not the same but I don't understand what it needs E.g.:

If(LookUp(CreditLimitChanges, AccountName= ListGallery.Selected.AccountName, Done) = true, Red, White)

 

I would appreciate any help.

Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    156,064 Most Valuable Professional on at

    HI @Torque ,

    Your example actually only needs

    If(
     ListGallery.Selected.AccountName = "Pfeffer LLC", 
     Red, 
     White
    )

    and assuming the Done field is somewhere in the Gallery content

    If(
     ListGallery.Selected.Done, 
     White,
     Red
    )

    or the reverse with the same result

    If(
     !ListGallery.Selected.Done, 
     Red,
     White
    )

    Boolean (Yes/No) fields just need to be referred to as per this blog of mine. ! simply means Not()

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

     

  • Torque Profile Picture
    36 on at

    Thank you!

     

    Edit: @WarrenBelz your blog post clarified many aspects of using boolean values that were tripping me up, thank you, I really appreciate it.

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

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 366 Most Valuable Professional

#2
11manish Profile Picture

11manish 184

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 99 Super User 2026 Season 1

Last 30 days Overall leaderboard