cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ryanstokes
Regular Visitor

Issue with Newform?

Hello,

 

I have a app that I made that basically allows users to see data then has a button to navigate to a new page with a "NEW FORM". The first time through all is well, but the second time through, it is saving data from the last entry in the boxes. I have an ON VISIBLE set to do NEWFORM, so not sure what I am doing wrong? 

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions

Its very possibile... :). I tried to reset the form in the gallery button, but got an error as it couldnt "see" the fields on the new screen there. So I changed my OnVisible to have RESETFORM(Form1_1) and it seems to work. Not sure if it is proper programming or not... but it works for my small project.

 

Thanks for the help and pushing me in the right direction everyone!

View solution in original post

9 REPLIES 9
Jeff_Thorpe
Super User
Super User

What is the formula for navigating from viewing data screen to the new form. Also on new form what do you do after after submitting it?



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

It is... Navigate(Screen1_1,ScreenTransition.Fade, {HCBID:ThisItem.ph_id}) on a gallery to confirm the entry. Screen1_1 is default as a NEW FORM. 

 

On Screen1_1, I save the form as SubmitForm(Form1_1) then the form OnSucess - Navigate(Screen1,None) . 

Ryan what if you just have

 

NewForm(Form1_1);Navigate(Screen1_1,ScreenTransition.Fade, {HCBID:ThisItem.ph_id})

 

Then you know the form will be reset? That is how the default apps do it. Sorry, I don't have time to try it out but in my head that is how I would work through this.

 

Shane

Shane - Microsoft MVP, YouTube, and PowerApps Consulting for when you are in a bind to get this fixed quickly. And finally we now have PowerApps Training

Thanks, I just tried that... still leaves all the text boxes on the NEXT record populated. It is a new form.. but it just isnt resetting the text that was entered from the last user. Its pretty strange.

So just to confirm, you're calling this from the OnVisible property of Screen1_1?

NewForm(Form1_1)

I'm not sure if this will make any difference, but I'd try calling NewForm before Navigate. This is how the navigation works in the auto-generated apps.

 

NewForm(Form1_1);
Navigate(Screen1_1,ScreenTransition.Fade, {HCBID:ThisItem.ph_id}) 

Okay. Crazy thing just to try until someone smarter than me figures this out.

 

What if you manually Reset each field? 

 

NewForm(YourForm);Reset(Field1);Reset(Field2); etc

Shane - Microsoft MVP, YouTube, and PowerApps Consulting for when you are in a bind to get this fixed quickly. And finally we now have PowerApps Training

Out of interest, what are you doing with the HCBID context variable that you're passing into Screen1_1? Could you be using this variable in a way that interfers with the way that the form works?

Its very possibile... :). I tried to reset the form in the gallery button, but got an error as it couldnt "see" the fields on the new screen there. So I changed my OnVisible to have RESETFORM(Form1_1) and it seems to work. Not sure if it is proper programming or not... but it works for my small project.

 

Thanks for the help and pushing me in the right direction everyone!

Hey @Shanescows

 

 

I know this is pretty late and maybe you already figured it out.

But you can't reset Form or Gallery Controls. They can only be resetted within the Form or Gallery

 

 

Kind regards

 

 

Tom



If this reply has answered your question or solved your issue, please mark this question as answered.

Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.

Helpful resources

Announcements
Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Government Carousel

New forum: GCC, GCCH, DoD - Federal App Makers (FAM)

In response to the unique and evolving requirements of the United States public sector, Microsoft has created Power Apps US Government.

Users online (2,326)