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

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

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
Community Support

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.

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
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (72,358)