Is it possible to use fn-IsCurrentUser to identify multiple users? I want to be able to show or hide a form control depending on who the user is. There are multiple users who should see the control.
I've tried the following:
fn-IsCurrentUser("corp\dstarr") || fn-IsCurrentUser("corp\test")
and that doesn't work. I've also tried:
fn-IsCurrentUser("corp\dstarr" || "corp\test")
and that doesn't work either (although I sort of expected it wouldn't).
Can this be done and what is the correct syntax for doing so?
Solved! Go to Solution.
the first approach should be working. Are both expressions working as expected when you try them one after another? If not it might be the format that you enter the user logon names in (depending on your authentication method the logon name might contain more than just domain\username).
I'd try to log the complete logon names for the users in question and afterwards use those in the expression.
Another approach that works good for me is to add a SharePoint-Group that contains all the users in question and use the fn-IsMemberOfGroup(groupname) function to check if the user is one of those I'm searching for. This also gives you the benefit to modify the group without editing the workflow.