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
Solved! Go to Solution.
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
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.
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
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
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
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.
User | Count |
---|---|
257 | |
110 | |
97 | |
57 | |
40 |