Skip to main content
Nintex Community Menu Bar
Answer

How to use fn-IsMemberOfGroup

  • October 6, 2017
  • 12 replies
  • 1033 views

Forum|alt.badge.img+3

Hello,

 

I want to show / hide some controls based on the membership of the current user. the group i need to check is different per item, i need to check it based on a property (CountryName).

 

When i put the fn-ismemberOfGroup function in the expression as fn-IsMemberOfGroup("Norway"), it works fine. when i use the following expression the item property is never used, fn-IsMemberOfGroup("CountryName") however when i user a Common property it works fine.

 

Further i tried to use the fn-IsMemberOfGroup("CountryName") using a rule but that didn't work out either. Is it possible to use this function with a rule or expression at run time and put in a dynamic group name?

 

208967_pastedImage_1.png

Best answer by sanderomeijn90

The problem was not the column, the expression did not work on a multi line rich text box. So the function works fine but not on that specific control.

12 replies

TomaszPoszytek
Forum|alt.badge.img+17

Hi!

Try to remove quotes surrounding the "CountryName", so just: fn-isMemberOfGroup(CountryName)

Regards,

Tomasz


Forum|alt.badge.img+3

Unfortunately that makes no difference. with or without quotes it is not working.

Regards,

Sander


Forum|alt.badge.img+7
  • October 6, 2017

I confirm : if you set the GroupName manually, the function works well...if you retrieve it from Item Properties : doesn't work.


Forum|alt.badge.img+16
  • October 6, 2017

The function fn-isMemberOfGroup works with named/hardcoded groups. It doesn't work with names that comes from a variable


TomaszPoszytek
Forum|alt.badge.img+17

Hi ‌ if any from the above answers helped you with solving your issue, please mark one of them as "Correct", so that other users will be able to use it as a solution if they face a similar problem.

Regards,

Tomasz


Forum|alt.badge.img+3

When i use the common variable instead of a named/hardcoded groupname it works fine.

Do you know if it is on the planning to support the named controls or item properties?


Forum|alt.badge.img+1

What kind of column is "CountryName" in your list ? For me, it works with free text, on an on premise tenant.


Forum|alt.badge.img+3

The problem was not the column, the expression did not work on a multi line rich text box. So the function works fine but not on that specific control.


Forum|alt.badge.img+3

i added a new reply with the solution, it was not the item property but the control on the form that caused the problems..


Forum|alt.badge.img+1
  • January 8, 2020

Hi, 

 

Can we enter multiple group names here. I tried to do that by adding && which did not work.

 

Thank you in advance!

 

Regards,

Ronnie


@fhunth wrote:

The function fn-isMemberOfGroup works with named/hardcoded groups. It doesn't work with names that comes from a variable


 


Forum|alt.badge.img+1
  • January 8, 2020

I resolved this by using the And function from the Inline function tab.

 

Thank you again!

 

Best,

Ronnie.


  • Novice
  • October 18, 2021

Can you please share code how you got it working? I have created one form variable & set the value. But it's still not working by calling  fn-IsMemberOfGroup(variable Name).