Skip to main content

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?

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


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>


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


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


Reply