Hello all,
I have a new form that has a submit button. It also has couple required fields.
Once the form is submitted, I want to display a confirmation screen (SuccessScreen).
Here is my code on Submit button -
If( SharePointForm1.Mode = New, Patch( Request_List, {ID: Blank()}, SharePointForm1.Updates, {SubmitBy : User().FullName, SubmitDate : Today() } ), SubmitForm(SharePointForm1) )
Following is OnSuccess of the form
ResetForm(SharePointForm1); RequestHide()
Does anybody have success with this scenario? Please let me know.
Thanks,
Nick
Solved! Go to Solution.
Thanks for the help!
I realized that it's always better to use SharePointForm1.LastSubmit instead of :
Hi @Nick2020,
Could you please share a bit more about your scenario?
Do you want to display or navigate to SuccessScreen when you create a new record in your SP list?
Based on the needs that you mentioned, I have made a test on my side, please take a try with the following workaround:
Set the OnSave property of the SharePointIntegration control to following:
If( SharePointForm1.Mode = FormMode.New, SubmitForm(SharePointForm1);Set(IsNewRecord, true), SubmitForm(SharePointForm1) )
Set the OnSuccess property of the SharePointForm1 to following:
If( IsNewRecord, Patch('20190121_case9', SharePointForm1.LastSubmit, {Title: "Modified"});Navigate(SuccessScreen, ScreenTransition.None), ResetForm(SharePointForm1); RequestHide() )
On your side, you should type:
If( IsNewRecord, Patch(Request_List, SharePointForm1.LastSubmit, {SubmitBy : User().FullName, SubmitDate : Today()});Navigate(SuccessScreen, ScreenTransition.None), ResetForm(SharePointForm1); RequestHide() )
Set the OnView property of the SharePointIntegration control to following:
Set(IsNewRecord, false); ViewForm(SharePointForm1)
Set the OnNew property of the SharePointIntegration control to following:
Set(IsNewRecord, false); NewForm(SharePointForm1)
Set the OnEdit property of the SharePointIntegration control to following:
Set(IsNewRecord, false); EditForm(SharePointForm1)
Best rgards,
Thanks for the help!
I realized that it's always better to use SharePointForm1.LastSubmit instead of :
User | Count |
---|---|
183 | |
106 | |
88 | |
44 | |
43 |
User | Count |
---|---|
226 | |
108 | |
106 | |
68 | |
68 |