cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper V
Helper V

Show access denied message, if submitter clicks that link in email.

I have a Powerapps Editform with SharePoint as the datasource.

 

Submitter submits the record and an email is sent to the approver with the link of the EditForm. Whenever approver clicks the link, it opens the form correctly and able to approve. However, I noticed if i forward that email to submitter, submitter is able to access that link and open the form, which shouldn't happen.

 

Approver and submitter are 2 different roles maintained in 2 different Office 365 group. Any inputs would be helpful. Thanks.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: Show access denied message, if submitter clicks that link in email.

You could change the visible property of the form to this:

If(User().Email=YourSubmitterEmail,false,true)

So that the form is not visible for the user. 

View solution in original post

3 REPLIES 3
Highlighted
Super User
Super User

Re: Show access denied message, if submitter clicks that link in email.

You can use User().Email to check if the user's email is the same as the submitter for that form.

Something like this:

 

If(User().Email=YourSubmitterEmail,Notify("Access denied",Error))

 

You can us this same formula to drive the logic to disable any control you'd like. 

This would be on the form's OnVisible property.

Highlighted
Helper V
Helper V

Re: Show access denied message, if submitter clicks that link in email.

@EricLott 

 

  1. Whenever submitter submits the request, an email is sent to approver.
  2. Approver clicks on the link in the email, which opens up the form for approval. I tried adding this condition in OnVisible of Approve screen If(User().Email=YourSubmitterEmail,Navigate("Access denied Screen",None)). However, I cant use Navigate in OnVisible it seems. I can't use Notify('Access Denied, Error) because the submitter would see the form already which is meant to be seen only by approver. Hence tried using Navigate but doesnt work in OnVisible.

3. Any alternative ways to acheive this ?

 

 

 

 

 

 

 

Highlighted
Super User
Super User

Re: Show access denied message, if submitter clicks that link in email.

You could change the visible property of the form to this:

If(User().Email=YourSubmitterEmail,false,true)

So that the form is not visible for the user. 

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published 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 (6,488)