cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
CraigFeg
Level: Powered On

Restrict/Limit Button Access To Form Based On User/Other Field Values

I am currently trying to add a button to a form in which the access to be able to click the button should only be possible for a 'Line Manager' of an employee. I have a field in a previous form for 'Line Manager' and therefore was thinking 'is it possible to use the 'Line Manager' field from a form so that only the O365 account linked to the 'Line Manager' field can click the button?

 

Help much appreciated,

 

Craig

1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

Re: Restrict/Limit Button Access To Form Based On User/Other Field Values

You should be able to add a condition in the DisplayMode property of a button.

 

Something like this: DisplayMode property of button.

If( Employee.Position = "Line Manager",
    DisplayMode.Edit,
    DisplayMode.Disabled
)

 

EDIT.

And yeah, you should be able to access control data from another screen. If it's a dropdown, you can do something like this:

If( Dropdown1.Selected.Value = "Line Manager", 
    // Do this,
    // If not, do that instead
)

You don't need to specify the screen where the control is in. Just the name of it (In the example, that's Dropdown1).

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Re: Restrict/Limit Button Access To Form Based On User/Other Field Values

You should be able to add a condition in the DisplayMode property of a button.

 

Something like this: DisplayMode property of button.

If( Employee.Position = "Line Manager",
    DisplayMode.Edit,
    DisplayMode.Disabled
)

 

EDIT.

And yeah, you should be able to access control data from another screen. If it's a dropdown, you can do something like this:

If( Dropdown1.Selected.Value = "Line Manager", 
    // Do this,
    // If not, do that instead
)

You don't need to specify the screen where the control is in. Just the name of it (In the example, that's Dropdown1).

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,018)