cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Advocate III
Advocate III

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

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.
Highlighted
Advocate III
Advocate III

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
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (4,579)