When I preview my app, it always shows the EditForm view. I need to test a behavior for the NewForm view and I'm getting tired of publishing over and over so I can test it in SharePoint.
How do I switch between EditForm and NewForm?
The default can be set to New in preview so that you can see the cards but in real mode, the default is usually changed with either NewForm(Form1) or EditForm(Form1) in the function that selects the form. Ie. an icon that navigates to the screen with the form such as Navigate(Screen1,None); EditForm(Form1)
There are a few differences between the preview when you are developing the app and what happens in the actual production version of the app but very few in my experience. When you are concentrating on a single screen during development, some of the variables may not have been instantiated, for example, if they are created at Navigation from another screen. To really see if they work, you may have to go into preview mode and start in the first screen at the beginning of the app and move to each screen to see how it works.
The mode of the form is usually set dynamically in the control that navigates to it using NewForm(Form1) or EditForm(Form1). Even so, during testing you could put two buttons on the screen, one with the OnSelect property as NewForm(Form1) and another one as EditForm(Form1). That way you wouldn't have to jump around to test how it looks.
Check out our new profile badges recognizing authored solutions!
We are excited to announce the Power Apps Super Users!
Did you miss the call? Check out the Power Apps Community Call here.
Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!