cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
shettyshashank1
Frequent Visitor

Canvas App Form in Edit Mode instead of New Mode


I have a Main screen and a button. On Button click , i need to navigate to another screen with a form in new mode. The formula on button select in Main Screen is as below :-

NewForm(IdeaForm_1);Navigate( 'New Idea Screen_1',ScreenTransition.None)

 

But when i navigate to New Ideas Screen_1 screen, i get the IdeaForm_1 in Edit Mode instead of New Mode.

 

Can some one please help me if they have come across this issue and resolved it.

 

Many thanks

1 ACCEPTED SOLUTION

Accepted Solutions
shettyshashank1
Frequent Visitor

HI @AKB_2K  @Drrickryp ,

 

I think , after lot of testing , i think i found the solution which is as below

 

I  changed the default mode of from to be FormMode.New  instead of FormMode.Edit

 

Then in the Main Screen , i updated the Button OnSelect formula to below and then it seems to be working fine.

 

NewForm(IdeaForm_1);ResetForm(IdeaForm_1);Navigate( 'New Idea Screen_1',ScreenTransition.None) 

 

Thanks for your help!

 

cheers

View solution in original post

6 REPLIES 6
Drrickryp
Super User
Super User

Hi @shettyshashank1 

Check the OnVisible property of the 'New Idea Screen_1' to see if you have an EditForm(IdeaForm_1) there.  Somewhere, your NewForm() command is being overwritten. 

Also check the name of the form on that screen to make sure that it is correctly referenced in your NewForm() function.  The _1 on the form name makes me suspicious that you have copied the form from another screen and forgot to update your NewForm() function.

shettyshashank1
Frequent Visitor

HI @Drrickryp ,

 

Thanks for your Quick response.

 

The Onvisible property is empty and i have correctly referenced form name in New Form function.

 

Is there anything else that i can try  ?

 

thanks

Shashank

 

 

AKB_2K
Resolver I
Resolver I

May be you are not resetting the form after you submit which might be causing this issue. Can you confirm if you added a Resetform command after you submit the form, something like this?

 

Submit(IdeaForm_1);ResetForm(IdeaForm_1);Back();

 

Add this to your submit button and then go back and click the new form button. Let me know if this works.

 

Dont forget to click "Accept as solution" if this post helped solve your query.

 

Cheers,

AK

HI @AKB_2K ,

I am using Patch function to submit and did add ResetForm after Patch command as per your suggestion but i am still having the issue.

 

thanks

Shashank

 

shettyshashank1
Frequent Visitor

HI @AKB_2K  @Drrickryp ,

 

I think , after lot of testing , i think i found the solution which is as below

 

I  changed the default mode of from to be FormMode.New  instead of FormMode.Edit

 

Then in the Main Screen , i updated the Button OnSelect formula to below and then it seems to be working fine.

 

NewForm(IdeaForm_1);ResetForm(IdeaForm_1);Navigate( 'New Idea Screen_1',ScreenTransition.None) 

 

Thanks for your help!

 

cheers

Drrickryp
Super User
Super User

@shettyshashank1 

That makes sense because when you reset the form it uses the forms default property, negating your NewForm() command. If you had changed the order ie ResetForm();NewForm() it would have worked as well.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (6,551)