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 / Disable checkbox depen...
Power Apps
Answered

Disable checkbox depending on text label

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

This is what I have for my visible for the checkbox in the gallery If(!CR_1.Text = "95 Blocked/On-Hold" || Self.Value,true, false). If the backlog status is 95 blocked I want to disable the checkbox. Right now, it disables all the ones that are not checked. CR_1.Text is the label that holds the backlog status. Capture.PNG

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

    @Anonymous 

     

    Change your formula to the following:

    !(CR1.Text = "95 Blocked/On-Hold") || Self.Value

     

    That will give you what you want.  You might notice that you have a blue line under the equal sign.  That is because the Not operator is doing a Not on the CR_1.Text and then comparing - that is boolean to text...not valid.  If you put the parens around the comparison, it will work.

    And, BTW, you don't need to do the If and true and false...it will evaluate to true or false anyway.

     

    I hope this is helpful for you.

     

    EDIT: Forgot the closing paren in my original post. It is corrected above now.

  • mdevaney Profile Picture
    29,993 Moderator on at

    @Anonymous 

    I think you should simplify the code to only this code below.  The 2nd part of your conditional statement is what caused the checkboxes to disappear.

     

     

    !CR_1.Text = "95 Blocked/On-Hold"

     


    If you want to disable the checkbox instead of making it invisible put this code in the DisplayMode property

     

    If(!CR_1.Text = "95 Blocked/On-Hold", DisplayMode.Edit, DisplayMode.Disabled)

     

    ---
    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."

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    this causes all of the check boxes to become blank @mdevaney 

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

    @Anonymous 

    Please change your formula to this:

    !(CR1.Text = "95 Blocked/On-Hold") || Self.Value

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Anonymous @mdevaney 

    You've got to enclose your comparison in parens if you are going to ! Not them!!

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 236 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 188 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 130

Last 30 days Overall leaderboard