One of the reasons why developers and programmers hate no code solutions and SPD is because even trival tasks can be tricky. I have been recently building lots of no-code solutions and came across several different challenges in SharePoint Designer workflows which usually considered as very common tasks using Visual Studio or coded solutions. One of them is to get logged in user name. After looking through several different options, I have found that there is no out of box option available in SharePoint designer which would return currently logged in user’s full name.
After quick Google search, I stumbled upon stack trace article which gave me hint but it still took me while to figure out the correct solution. Do not use stack trace article as it would return wrong info (Current User returns surprisingly item creator information while Modified By guaranteed to return currently logged in user information).
Here is how I was able to derive currently logged in user’s full name and detailed step by step guide.
Step 1 => From the SharePoint Designer workflow string builder window, click on the Add or change lookup
Step 2 => On the Lookup for string window, select following:
field data to retrieve => data source – user profiles, field from source – first name
find the list item => field – account name, value – click on “…”
Step 3 => On the next popup window, select workflow lookup for a user. It should open up another popup window called “lookup for person or group”, select current item -> modified by. Click series of OK buttons on all the pop up windows until you get back to the string builder window.
Step 4 => At this stage, it should return currently logged in user’s first name. Repeat all these 1-3 steps for last name and final result should be full name.
Hope this step by step guide would help. This will definitely help in future if I come across similar situation.