cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Advocate I
Advocate I

Change between NewForm and EditForm in Preview

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?

5 REPLIES 5
Super User II
Super User II

_1.png

Advocate I
Advocate I

So that has nothing to do with the way the form performs "for real"? It's just for the preview?

Super User II
Super User II

@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)

Advocate I
Advocate I

So the preview isn't the same as running it, which is why the variables and data don't reset every time?

@marymascari 

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. 

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (23,349)