cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Nick2020
Level: Powered On

New form submit button to display confirmation screen

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

1 ACCEPTED SOLUTION

Accepted Solutions
Rodolfo1840
Level: Powered On

Re: New form submit button to display confirmation screen

Thanks for the help!

 

I realized that it's always better to use SharePointForm1.LastSubmit instead of :

Patch(Altas,{ID:Blank()}, SharePointForm1.Updates,

View solution in original post

2 REPLIES 2
Community Support Team
Community Support Team

Re: New form submit button to display confirmation screen

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:4.JPG

 

5.JPG

 

6.JPG

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,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Rodolfo1840
Level: Powered On

Re: New form submit button to display confirmation screen

Thanks for the help!

 

I realized that it's always better to use SharePointForm1.LastSubmit instead of :

Patch(Altas,{ID:Blank()}, SharePointForm1.Updates,

View solution in original post

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

Top Kudoed Authors
Users Online
Currently online: 294 members 5,651 guests
Please welcome our newest community members: