cancel
Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

How do I set a user permission for a specific control on the form

I am crearing a lesson observation form which is filled in by the observer and observee, majority of the form the observer fills in but there is one field that only the observee fills in and they cant edit the rest of the form.

Can I set this up as a validationor rule within the form ? The observee is recognised as staff initials for their form and a workflow is set for when the observer creates the form and specific permissions are set.

The validation I require is on the form not really workflow.

Does anyone have any idead, I need to roll out this form in a few days as observations are about to start so please do let me know asap if you have any ideas.

Labels: (1)
Reply
18 Replies
Workflow Hero

Re: How do I set a user permission for a specific control on the form

Not related to permissions per say, but a method I've used to show/hide fields from specific users is to wrap the field in a panel and add a rule on that panel that leverages the userProfileLookup function to hide the panel unless the current user is the person who should see it.  You can get fancier if needed, but the formula I've used to hide a control from users unless they were in a specific department is as followed:

userProfileLookup({Common:CurrentUser},"Department")!="1234 - The Security Group"

You would need to know the field (AD attribute) you want to check (Department in my case) but you could check any userProfile property which can be seen in Central Administration within the User Profile Service -> User Properties.

Hope that helps.

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: How do I set a user permission for a specific control on the form

I used formatting rule based on security group like below on the control that I am willing to hide/disable.

not(fn-IsMemberOfGroup("PrjReq Admins")) 

what the above statement does is it checks if the current logged in user is part of given security group and hides control if the user is not part of. In your case if the observee is not part of security group but any other person field on the form then you can make straight person field value and current user value comparison on the rule and get your functionality work.

Hope that helps!

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: How do I set a user permission for a specific control on the form

I took a look at Jaya's idea.  It definitely works with the following scenarios in place:

  1. The users must be in the SharePoint Group (ie. PrjReq Admins) directly, and not via an Active Directory group.
  2. The inline function fn-IsMemberOfGroup is only available in the Appearance Expressions on an element of the form, not part of a Rule.

Our environment leverages AD groups within SharePoint Groups for security and the IsMemberOfGroup can't interrogate AD groups but I can use the userProfileLookup to compare values of the current user.

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: How do I set a user permission for a specific control on the form

I think ‌ and ‌ have given good answers to this question.
Do you think you have gotten the answer that you need, ?

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: How do I set a user permission for a specific control on the form

Hello Jaya Borra,

I think your idea works but the observee is not part of any sharepoint group, the form belongs to them and they are identified by a field within the form as 'staff Initials' so I require the 'staff intials' user to only edit one control and all the other controls to be disabled for them.

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: How do I set a user permission for a specific control on the form

‌, if that is your scenario, I would suggest something like group all other controls inside one panel and apply disable rule to the panel if IsCurrentUser==StaffInitials

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: How do I set a user permission for a specific control on the form

Hi Abdullah,

Thank you for your prompt response, is this the formula for a formatting rule to disable the panel for staff initials ?

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: How do I set a user permission for a specific control on the form

I just used this formula to fn-IsCurrentUser(Staff Initials) within the Appearance setting as an expression but it hid the whole panel i still want it to be shown but disabled if the current user is Staff Initials

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: How do I set a user permission for a specific control on the form

priya1

My idea is something like this. The rule is applied to the panel instead. Used Formatting rule where it get disabled in Edit Mode.

0 Kudos
Accept as Solution Reply