Logged in User/Current User
Yes there is, although using it in a calculated field means the check is only done upon a Save/Apply of the record. To get the current user editing a record on Save/Apply, use the following functions:
You can then concatenate these together to build a typical "Last, First Middle" username format. Once you have this, you can pass it to the USER() function, to check it against your field.
Since I don't believe we can concatenate within an IF statement, you'll need two fields to do this that fire in order.
USERLASTNAME(Editor) & ", " & USERFIRSTNAME(Editor) & " " & USERMIDDLENAME(Editor)
CONTAINS(ANY, GETUSERS([field_user]), USER(NAME, [Field_1])),
I'm attempting to implement this, however, I'm having issue with USER accepting a field reference as the value:
- returns: nothing
Similarly, concatenating directly within the the USER function returns odd results which prevents matching:
USER(NAME, USERLASTNAME(Editor) & ", " & USERFIRSTNAME(Editor))
- returns: "Last","c"First"c
- comment: includes quotation marks and c's
USER(NAME, CONCATENATE(USERLASTNAME(Editor), ", ", USERFIRSTNAME(Editor)," ",USERMIDDLENAME(Editor)))
- returns: Last,First
- comment: removes spaces which prevents matching. I cannot figure out how to keep the space. Is there an escape value I can use?
If there is a way to force User to keep the space in the third case I think that would solve my problem. Otherwise, am I missing some aspect when trying to implement this?