Evaluating the Current User
This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.
The following example describes a CheckUser function, which determines the user who initiated a state change. The function uses two common string functions, instr and Left, to capture the user's name.
To use this example, create the CheckUser function in the Script Editor.
Example Script
'// -----------------------------------------------------------------------------------
'// Name : CheckUser
'// Purpose : checks the sender of the WorkflowSession object
'// Prereq : none
'// Inputs : strUSer user to be checked
'// Return : Returns TRUE if the user indicated is the sender
'// -----------------------------------------------------------------------------------
Function CheckUser (strUser)
User = left(workflowsession.sender,instr(workflowsession.sender,"@")-1)
If User <> strUser then
checkuser = FALSE
else
checkuser = TRUE
end if
end function
See Also
Scripting in the Workflow Designer for Exchange Server | Script Examples for Exchange Server | Creating Script Procedures