Page 1 of 1

Really Need Advice: User and Managers

Posted: 14 Oct 2013
by MES5464
I am not using the People/Groups feature of SharePoint because I haven't figured out how I can create custom columns in the user list.

So, I have created a custom list for my needs. But, now I have a problem to solve. I need to create forms for the supervisor to approve or decline vacation. I need to be able to direct the supervisor to an editable form for vacation requests but I want all others to be directed to a read-only form.

The functions available in the "User-defined rule" provide functions for getting the current user but I need to be able to compare the current user to my text field.

Is there a way to pass in a variable?

What does the ContainsCurrentUser function use, the domain/username ?

Any help or ideas will be great.

Re: Really Need Advice: User and Managers

Posted: 15 Oct 2013
by Dmitry Kozlov
ContainsCurrentUser() function determines if the current user is selected in provided People or Group field or belongs to one of selected SharePoint or AD groups. If you use your own list of users you can compare the selected value with tokens [CurrentUserName] if you store display names in your list or [CurrentUserLogin] if you store logins. Examples:

Code: Select all

Contains([Your field], [CurrentUserLogin])
[Your field] == [CurrentUserLogin
]

Re: Really Need Advice: User and Managers

Posted: 16 Oct 2013
by MES5464
The CurrentUserName is working good for me but when I try to compare it with a Cross-site Lookup field value, I get the ID#;FullName, so I can't use CurrentUserName to compare against the cross-site lookup field.

Re: Really Need Advice: User and Managers

Posted: 18 Oct 2013
by Dmitry Kozlov
Hello,

Try to use Contains function, which checks if the first string contains the second one:

Code: Select all

Contains([Your field], [CurrentUserName])