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 / Correct Way to Referen...
Power Apps
Answered

Correct Way to Reference a Checkbox Variable

(0) ShareShare
ReportReport
Posted on by 201

 

I am trying to set the Default property of a checkbox (ChkMixTot) to a user selection (set via a global variable (VarLockMix)), otherwise I want to checkbox to be blank. I have the following formula in ChkMixTot.Default:

 

If(VarLockMix<>"",VarLockMix,false)

It appears to be working, but I get a warning saying "expecting a true or flase value. The current value may cause unexpted behavior".

 

What do I need to do to ensure this works properly and avoid any "unexpected beahavior"?

Categories:
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Is the VarLockMix a boolean variable? If yes, you could just use the following formula

     

    If(VarLockMix, true, false)
  • Verified answer
    timl Profile Picture
    37,287 Super User 2026 Season 2 on at

    Hi @AGS94 

    Could you show us the code that you're using to Set the VarLockMix variable?

    Further to @Anonymous's post, if VarLockMix is a boolean variable, you can set the Default property to VarLockMix. This is because VarLockMix is logically the same as If(VarLockMix, true, false).

  • AGS94 Profile Picture
    201 on at

     

    Perfect! The following got rid of all errors when entered in ChkMixTot.Default:

     

    Value(VarLockMix)

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 July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard