Skip to main content
Nintex Community Menu Bar
Solved

How to use fn-IsMemberOfGroup

  • October 6, 2017
  • 12 replies
  • 939 views
  • Translate

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.

View original
Did this topic help you find an answer to your question?

12 replies

TomaszPoszytek
Forum|alt.badge.img+17

Hi!

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

Regards,

Tomasz

Translate

Forum|alt.badge.img+3

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

Regards,

Sander

Translate

Forum|alt.badge.img+7
  • 95 replies
  • 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.

Translate

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

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

Translate

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

Translate

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?

Translate

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.

Translate

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.

Translate

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..

Translate

Forum|alt.badge.img+1

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


 

Translate

Forum|alt.badge.img+1

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

 

Thank you again!

 

Best,

Ronnie.

Translate

  • Novice
  • 1 reply
  • 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).

Translate

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings