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 / problem with OnVisible...
Power Apps
Unanswered

problem with OnVisible screen property boolean evaluation

(0) ShareShare
ReportReport
Posted on by

I'm confused about what is going on here.  I was introduced to UpdateContext()

 

I have a screen CREATE, in this screen's OnVisible I have 
UpdateContext({TitleDisplayDisabled: true, TopicAnalysisMinimize: true})

I want to hide a form with var TopicAnalysisMinimize.  So I go into this form Visible property and tried these two evals
Visible = TopicAnalysisMinimize; assuming this would work as var TopicAnalysisMinimize is true right now)
Visble = If(TopicAnalysisMinimize, true, false); assuming this would work as TopicAnalysisMinimize is true

HOWEVER,
If I revert my second to: If(TopicAnalysisMinimize, false, true); This actually works and my forms is hidden

I do not understand what is going on, if TopicAnalysisMinimize is true then my first argument in the If should be evaluated?


Categories:
  • LaurensM Profile Picture
    12,516 Moderator on at

    Hi @gstlouis,

     

    I may be misunderstanding the issue, but you would like to hide the Forms when the variable is set to true. Is this correct?

     

    The Visible property expects either true or false to indicate visibility. True being visible and false being hidden.

     

    Your first 2 code examples both return true and will result in the form being visible. The third example, however, will result in false making the form hidden.

    If(
     Condition returning true/false,
     If true then run this code...,
     If false then run this code...
    )

     

    If this solves your question, would you be so kind as to accept it as a solution & give it a thumbs up.

    Thanks!

  • BrianS Profile Picture
    2,407 Super User 2024 Season 1 on at

    For the visible property all that is needed is a true or false state. When using boolean variables you can simply have the variable name as the only thing in the property. If you just put TopicAnalysisMinimize in the visible property, the item will be visible if that variable is true and ill not show when it is false. You can use !TopicAnalysisMinimize to reverse that logic

  • STS1SS Profile Picture
    307 on at

    Ill start at the end.

     

    Your IF says if the variable TopicAnalysisMinimize is TRUE, make the form NOT VISIBLE.

     

    The first thing is working too... you set TopicAnalysisMinimize to TRUE, then set the fomr as VISIBLE if that variable is TRUE.

     

    Looks like they are both working.

     

    If you want the form hidden at the start, then just use the second formula.

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

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 252 Most Valuable Professional

Last 30 days Overall leaderboard