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

4 REPLIES 4
Advocate III
Advocate III

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

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

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

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

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

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