Skip to main content
Nintex Community Menu Bar
Solved

fn-isMemberOfGroup and a variable?

  • August 17, 2016
  • 4 replies
  • 159 views
  • Translate

Forum|alt.badge.img+9

I have a drop down that is used to pick a "group" name.

 

I want to use the fn-isMemberOfGroup() function to display a section only if the member is part of a group based on that drop down.

 

Example: Dropdown field (named "Industry") includes:

Industry1

Industry2

Industry3

 

I have 3 sharepoint groups (each with membership visibility set to Everyone)

Industry1 Viewers

Industry2 Viewers

Industry3 Viewers

 

I've tried every combination I can think of to get this to work

  • fn-isMemberOfGroup("Industry1 Viewers")     -- manually type name, works fine
  • fn-isMemberOfGroup(Industry+" Viewers")     -- does not work 
  • fn-isMemberOfGroup("Industry Viewers")       -- does not work
  • fn-isMemberOfGroup(Industry Viewers)          -- does not work
  • fn-isMemberOfGroup(""+Industry+" Viewers")  -- does not work
  • fn-isMemberOfGroup(Industry" Viewers")        -- does not work

 

Is this possible?  Am I messing up the syntax?

Best answer by brentless

I finally got around to implementing this.  For anyone interested, pretty much the answer is it can't be done.  As of right now, the fn-isMemberOfGroup function must take a straight up text string (no variables).

To resolve what I needed, I created a super long list of  "OR" strings

=CONCAT(" || ({ItemProperty:Operating_x0020_Company}==""",A4,""" && fn-IsMemberOfGroup(""",B4," Managers""))")

Where Column A was the name of the Operating Company and B is the display name of the corresponding group.  Then concatenated about 30 rows together to have a very long comparison statement.

A rather unimpressive solution, but it accomplishes the task

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

4 replies

Forum|alt.badge.img+11
  • Scout
  • 468 replies
  • August 22, 2016

Hi, are you using the Named Control or the Item Property to get the Industry value? You should use the Named Control in order to have the current value and not the one that was in the form when it's opened.

If you're already using the Named Control, could you try to create a calculated field, where you concatenate the Industry field and the text " Viewers" and then use it in the function?

Giacomo

Translate

Forum|alt.badge.img+9
  • Author
  • 56 replies
  • August 22, 2016

Tried both of those with no luck unfortunately. I am mainly using the Named Control. I can do a calculated field that creates the string and generates the correct concatenated string, which still doesn't work as the passed value, but it's as if that function can ONLY accept a hard codes string in quotes...

Get Outlook for Android<https://aka.ms/ghei36>

Translate

Forum|alt.badge.img+11
  • Scout
  • 468 replies
  • August 22, 2016

Hi,

looking for additional details about the parameter of fn-ismemberofgroup I've found this:

http://help.nintex.com/en-US/O365/Default.htm#O365Forms/Visual reference/Insert Reference pane.htm

Looking at Inline function description, it looks like that inline functions are evaluated only when the form is loaded and not at runtime, so in your case it could be that the named control is empty on load so it doesn't match anything..could you try to select an industry and save the item and see if, opening that item, the function is correctly evaluated?

Giacomo

Translate

Forum|alt.badge.img+9
  • Author
  • 56 replies
  • Answer
  • January 6, 2017

I finally got around to implementing this.  For anyone interested, pretty much the answer is it can't be done.  As of right now, the fn-isMemberOfGroup function must take a straight up text string (no variables).

To resolve what I needed, I created a super long list of  "OR" strings

=CONCAT(" || ({ItemProperty:Operating_x0020_Company}==""",A4,""" &amp;&amp; fn-IsMemberOfGroup(""",B4," Managers""))")

Where Column A was the name of the Operating Company and B is the display name of the corresponding group.  Then concatenated about 30 rows together to have a very long comparison statement.

A rather unimpressive solution, but it accomplishes the task

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