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
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (7,859)