I have a home page with a button that navigates to another screen with a button that when pressed certain cards become visibled. The default view of the form should be the results of pushing the button. The current code from the button on the homepage is this:
Navigate(ScreenNCANew,ScreenTransition.Fade); ResetForm(NCAForm_2); Select(ScreenNCANew!Name=NCAGeneralInfo_2)
ChatGPT gave me that code but it's not working. I have tried other things but the form still comes up blank.
All of the fields that should appear by default, all have the following code on the visible property: NCAGeneralInfo_2.DisplayMode=DisplayMode.Disabled. The NCAGeneralInfo_2 is the button that should be pressed upon navigating to the screen.
If there is another approach to doing this? I'm totally open to it. My goal is to make some fields visible when a particular button is pushed and other fields visible when another button is pushed.
I think i can help you...
If the screen needs to launch with a button pressed as default, just go to the "OnVisible" propriety and set the formula: Select(button_name). Just that!
Sorry, I still don't understand the scenario. The default view should only be viewed when the button is actively pressed? Or the default view should be navigated to (via the Tab button) when the button is pressed?
I didn't explain it very well.
I have a "tab" called General which is a button. That button, when pressed, should be the default view when users land on the screen. That means the button has to be pressed upon navigating to the screen. What code do I need to put on the button that navigates from the home screen to the screen containing the General button that would "Press" the button?
this is the code that is currently on the button on the home screen:
Navigate(ScreenNCANew,ScreenTransition.Fade); ResetForm(NCAForm_2); Select(ScreenNCANew!Name=NCAGeneralInfo_2)
The last part was supposed to "select" or "press" the button which is called "NCAGeneralInfo_2". I have tried various codes that seem to only render the button unPressed.
I hope that's more clear. Thanks for your time.
I'm not sure what that Navigate formula is trying to do, but for your question regarding "make some fields visible when a particular button is pushed and other fields visible when another button is pushed" you can use a variable.
Here's an example for Button1 OnSelect:
Set(varButton1,!varButton1)
Visible property of your field:
varButton1
When Button1 is pressed, it toggles the variable "varButton1" to true or false. And the visible property of the field also toggles to true or false at the same time.
WarrenBelz
146,524
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,906
Most Valuable Professional