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

Member of Group and Formatting Rules

Jump to solution

Hi All,

 

we have to disable controls on a form based on a status, e.g if the Status is <> "Draft" then disable few controls. Its easy, we can do it via the Formatting Rules. However, we want the controls to be remain enabled if the current user is a member of a certain SharePoint Group. e.g. say if the user is a member of HelpDesk group, we leave the controls enabled, so that they can change them.

 

We are not able to work out how we can use this combination. Under formatting rules, we don't get the option to check if the user is a member of a SharePoint Group. Not quite sure how to make use of the userprofilelookup function for this (if we can).

 

In one of the Discussion, it was suggested to use  "Yes/No" control and then use Expression - fn-IsMemberOfGroup("HelpDesk") for the Default Value. This worked fine, but the default value does not gets recalculated when another user opens the form. Say, if User A is a member of HelpDesk Group, the Default Value is triggered correctly and the Yes/No control is checked. The form is saved but when user B opens the form, the "Yes/No" control remains checked, even if the user is not a member of HelpDesk Group.

 

Not sure how we can achieve this ? Anyone can shed their experience in case they had a similar requirement ?

 

Thanks

 

Sam

Labels: (2)
Tags (1)
Reply
8 Replies
Workflow Hero

Re: Member of Group and Formatting Rules

Jump to solution

I needed to suppress a field based on whether the current user was part of a SharePoint group as well. While there is no IsMemberOfGroup option in the Formula Builder interface for Rules, it appears you can still use it. The following is working for me in a formatting rule that hides the form field when the current user isn't part of the specified group:

not(fn-IsMemberOfGroup("NameOfSharePointSecurityGroup"))

Thanks for your post, it lead me to experiment

Reply
Workflow Hero

Re: Member of Group and Formatting Rules

Jump to solution

Wow, Thank you Steven, that indeed worked. Thank You, much appreciated for sharing.

Reply
Workflow Hero

Re: Member of Group and Formatting Rules

Jump to solution

This is *exactly* what I was looking to do and it works perfectly!  Thanks for this.  But it makes me wonder what other little useful gems may be out there ready to use but not listed in runtime functions. Is there anywhere I could go to find a complete list?

Cheers,

Bruce

Reply
Workflow Hero

Re: Member of Group and Formatting Rules

Jump to solution

Glad that worked for you. Please mark as answered. We should add this to the enhancement requests list too

Bruce, I'm not aware of a list of these functions. Also, I might add that this may not be supported into the future since the option isn't in the GUI.

Reply
Workflow Hero

Re: Member of Group and Formatting Rules

Jump to solution

Steve, not sure how to mark it as answered. Don't see an option for that.

As you said, this may not be supported in the future or they might move this to an 'Enterprise' only feature as they did with the Printing ..

0 Kudos
Reply
Workflow Hero

Re: Member of Group and Formatting Rules

Jump to solution

Ah - I think this is the discussion area vs. the question area. Maybe that's why the answer option isn't there...

I'm bummed about the enterprise-only print function as well

0 Kudos
Reply
Not applicable

Re: Member of Group and Formatting Rules

Jump to solution

Hi, Shaju Samuel​, if you're logged in, you'll see a "correct answer" button below replies in the thread. Just select one that is correct. It's very helpful to other community members who search because related content with a correct answer will pop up with a green box/checkmark icon.

Thanks!

Frank

Your community manager

0 Kudos
Reply
Workflow Hero

Re: Member of Group and Formatting Rules

Jump to solution

Euan Gamble‌ Hey there! Question: Why isn't isMemberofGroup present in the functions menu, if we can use it? 

Reply