Announcements
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?
So that has nothing to do with the way the form performs "for real"? It's just for the preview?
@marymascari
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)
So the preview isn't the same as running it, which is why the variables and data don't reset every time?
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.
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.
Congratulations to our 2026 Super Users!
Congratulations to our 2025 community superstars!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
11manish 541
WarrenBelz 434 Most Valuable Professional
Valantis 289