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

Button to submit custom form but also redirect user back to home page?

I have a custom form in PowerApps which allows users to add items to a list in SharePoint. By default, when a user submits this form, the form screen closes and the user is taken to the list library page.

 

Ideally, I don't want the users having visibility of the list after they've submitted the form. I just want them to submit (i.e. add items), but not view all the other list items other users have added.

 

I was wondering if there's a function that allows you to direct the user to a different page when they hit the submit button, such as the site's home page. Currently the button just has OnSelect set to 'SubmitForm(SharePointForm1)'.

 

Any help would be great!

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
v-xida-msft
Community Support
Community Support

HI @toby95 ,

Could you please share a bit more about your scenario?

Do you want to redirect the user to different page (e.g. Site Home Page) rather than close the form screen when the user submits the form?

 

If you want to redirect the user to different page (e.g. Site Home Page) rather than close the form screen when the user submits the form, I afraid that there is no way to achieve your needs in PowerApps currently.

The Navigate() function is used to navigate between screens within a canvas app, which could not used to navigate between canvas app screen and web page (outside app) (I do not agree with @rajmilansinh 's thought).

 

As an alternative solution, you could consider custom your SP List View, to make sure the end users could only see these records created by themselves.

I have made a test on my side, please take a try with the following workaround:Test.gif

Within the Filter part, select "Show items only when the following is true:" option, column set to "Created By", operator set to "is equal to", Value set to [Me].

 

Best regards,

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.

View solution in original post

Hi @toby95 ,

Based on your statement, I think you misunderstand my solution.

 

The alternative soltuion I provided above just want you to edit current List View (in default, the "All Items" view is the Default view) rather than create a new SP list and set it as Default view.

Note: I edit "All Items" View (Default View) in my SP list rather than create new SP List View.

 

Please see my above GIF screenshot for more details. I afraid that there is no way to achieve your needs in PowerApps itself currently.

 

Best regards, 

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.

View solution in original post

5 REPLIES 5
rajmilansinh
Advocate IV
Advocate IV

There is a function "Navigate('screenname', ScreenTransition.Fade)"

 

Type "Navigate(" in function and then you will see the syntax as tooltip or suggestion there

Write this function after your " SubmitForm(SharePointForm1)' " function.

Like : SubmitForm(SharePointForm1); Navigate('screenname', ScreenTransition.Fade)

 

Mark this as solution if it helps you

v-xida-msft
Community Support
Community Support

HI @toby95 ,

Could you please share a bit more about your scenario?

Do you want to redirect the user to different page (e.g. Site Home Page) rather than close the form screen when the user submits the form?

 

If you want to redirect the user to different page (e.g. Site Home Page) rather than close the form screen when the user submits the form, I afraid that there is no way to achieve your needs in PowerApps currently.

The Navigate() function is used to navigate between screens within a canvas app, which could not used to navigate between canvas app screen and web page (outside app) (I do not agree with @rajmilansinh 's thought).

 

As an alternative solution, you could consider custom your SP List View, to make sure the end users could only see these records created by themselves.

I have made a test on my side, please take a try with the following workaround:Test.gif

Within the Filter part, select "Show items only when the following is true:" option, column set to "Created By", operator set to "is equal to", Value set to [Me].

 

Best regards,

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.

View solution in original post

Yes, I'd like for the user to be redirected back to the site's home page when they submit a form in the list library. However, as you say, this isn't currently possible.

 

I gave your view method a try. The view works fine, I can filter out list items so that the user is only seeing whatever they've created. However, even after setting this new view as the default view, when submitting a custom PowerApps form it's still redirecting the user back to an 'All Items' view.

 

The scenario we have is that staff can make car bookings by submitting their details into the SharePoint list. Ideally, when a staff member submits a request, we don't want them to have immediate visibility of all other staff requests. The way it's currently working, as soon as I submit the form I can see everyone's requests. I could easily snoop around or potentially modify other requests, depending on the permissions.

Hi @toby95 ,

Based on your statement, I think you misunderstand my solution.

 

The alternative soltuion I provided above just want you to edit current List View (in default, the "All Items" view is the Default view) rather than create a new SP list and set it as Default view.

Note: I edit "All Items" View (Default View) in my SP list rather than create new SP List View.

 

Please see my above GIF screenshot for more details. I afraid that there is no way to achieve your needs in PowerApps itself currently.

 

Best regards, 

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.

View solution in original post

marpio
Helper I
Helper I

So far this is working well for me:

On the submit button (or under formSubmit):

SubmitForm(SharePointForm1);Launch("MyPageURL")

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,659)