Make a text field visible for 4 user groups.

  • 2 August 2021
  • 5 replies
  • 5 views

Badge +3

Hello everyone,

 

I have a question.

 

I would like to make a textbox visible to multiple SharePoint groups.


Currently the textbox is only visible for one SharePoint group:
fn-IsMemberOfGroup("Partner Group")

 

I have already tried to add an OR function, but it didn't really work:
fn-Or(fn-IsMemberOfGroup("Test1 Group"), fn-IsMemberOfGroup("Test2 Group"))

 

Are there any tips what else I can try?

 

Many greetings


5 replies

Userlevel 3
Badge +12

Hi,


Try this way


fn-IsMemberOfGroup("Test1 Group") || fn-IsMemberOfGroup("Test2 Group") || fn-IsMemberOfGroup("Test3 Group") || fn-IsMemberOfGroup("Test4 Group")


Hope this help!

Badge +12

@FlorianZ17 you can also try to use the nested If statement.

Badge +3

Hello @kchaluvadi 


 


I tried your solution and at first it looked fine. Unfortunately, when I tested it, I realized that not only the four groups can see the text box.


 


fn-IsMemberOfGroup("Independence Gruppe") || fn-IsMemberOfGroup("Corporate Responsibility Gruppe") || fn-IsMemberOfGroup("People Gruppe")


 


I have also tried it with and without ".


 


If I only say fn-IsMemberOfGroup("Independence Gruppe") it works.


 


Do you have another idea?


 


Kind Regards,


 


Flo

Badge +11

@FlorianZ17  Below works for me:


 


Or(fn-IsMemberOfGroup('Group1'),fn-IsMemberOfGroup('Group2'))

Badge +12

@FlorianZ17 try below IF statement instead of Or



  • Add a calculated control i.e. ctrl_check_group:
    If(fn-IsMemberOfGroup("Independence Gruppe"), True, If(fn-IsMemberOfGroup("Corporate Responsibility Gruppe"), True, If(fn-IsMemberOfGroup("People Gruppe"), True, False)))

  • If ctrl_check group is !True then disable your text control 

Reply