Skip to main content

How do I get the name of the current user within the workflow. I don't want the Initiator or Modified By but the Current SharePoint User details so I can log this in the history

What are the actions when the logging should be done?

For eg: If it is after an approval task, use "Last Task Respondent".


We build our own workflow history to capture the approver name, task completion date, task outcome and any comments. We hide a calculated field on the task form and pull the Current users email into a variable.


If I'm understanding your post correctly, you don't want the current user running the workflow (i.e. Initiator), but instead any user based off their username or email address that the workflow is currently looking at. Essentially, any user pulled from a column in the list, correct?

Using the form, you could use the UserProfileLookup function to grab the PreferredName, and then store that into a field to be used directly in the workflow. 

Or, from the workflow itself, there are a couple options:

  1. You could use the Query User Profile action. 
  2. You could use the Query LDAP action. The individual query will depend on the value you intent to pass to Active Directory. In this case, it sounds like you're using email address, which should be the mail attribute.

       The query would look something like this:

(&(objectCategory=person)(objectClass=user)(mail={your email address item property}))

       Then in the Property to Retrieve field you'd enter displayName (or whatever other AD attribute you'd like to return).

If I've misunderstood your question, please give more detail.


Reply