Need expresion to enable field or tab to one user
Original Post by Sean Docherty (Imported from Ardevia Forum)
Hello,
I am looking for some assistance on how to enable the display of a field to a single user.
I know that I can use [[@User.IsMemberOfGroup("Group Name")]] for enabling a field for a SharePoint group of people, but I need to enable for only one.
Is there a way to enable a field for a SharePoint group and a single person in the same command?
Can I use the following command - [[@User.LoginName]] - to enable a field for a single user? If yes please provide an example of the above code.
Thank you
-
Original Post by Andrii Berezovskyi (Imported from Ardevia Forum)
Hello Sean
Yes you can use [[@User.LoginName]] or [[@User.Email]]
As I understand you want to enable field for a SharePoint group or single person wich have some username or email and belongs or not belongs to this group. In this case you can create next Assignment expression:
[[@User.IsMemberOfGroup("Group_Name")]] || [[@User.Email]] == "useremail@some.com"|| means OR
So this expression will enable the display field for a SharePoint group or single person with appropriate email wich belongs or not belongs to this group
Or you can use && if you want enable the display field for a user with email [[@User.Email]] and wich also belongs to "Group_Name" group.
[[@User.IsMemberOfGroup("Group_Name")]] && [[@User.Email]] == "useremail@some.com"&& means AND
Thank you
Ardevia support0
Please sign in to leave a comment.
Comments
1 comment