Hi Folks,
I have been implemented screen & inside newform , I want to create a variable to store the value initially false ex: updatecontext(variablename : false) and on newform visible property i want to set that variable.
and onclick of button i want to put updatecontext(variable name : true) so that form should be visiable.
How do I achieve this on onbutton click?
Thanks ,
Deepak
Solved! Go to Solution.
You could put it in the screen's onvisible event, which would set it to false each time the user navigated to that screen. Alternatively, you could put it in the navigate function that is used to get to that screen. For example, if your form that you're hiding/showing is on screen2, and if there's a button on screen1 that navigates the user to screen2, in the button's onselect you could put:
Navigate(Screen2,ScreenTransition.None,{showform:false})
This would allow some flexibility, as perhaps there's another situation where you wanted to navigate to screen2 and have showform be true for that scenario.
Sorry, I'm not quite following your scenario, but it seems that what you've stated should work fine. In the button's onselect event, you can have UpdateContext({showform:true}), and the visible property of the form can be showform.
i was like where to set that UpdateContext({showform:false}) initially ? is it should be hide on something ? or something like ?
You could put it in the screen's onvisible event, which would set it to false each time the user navigated to that screen. Alternatively, you could put it in the navigate function that is used to get to that screen. For example, if your form that you're hiding/showing is on screen2, and if there's a button on screen1 that navigates the user to screen2, in the button's onselect you could put:
Navigate(Screen2,ScreenTransition.None,{showform:false})
This would allow some flexibility, as perhaps there's another situation where you wanted to navigate to screen2 and have showform be true for that scenario.