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?
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.
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
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!
WarrenBelz
146,594
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,928
Most Valuable Professional