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 II
Super User II

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
Helper II
Helper II

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

View solution in original post

Drrickryp
Super User II
Super User II

@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
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (880)