In my approval workflows, once an approval task is complete, I grab the name of the person who completed the task in order to populate a Task Approved By field.
I do this by giving each task a unique name held in a variable - e.g. Marketing - ID{Current Item:ID} - and then on Approve or Reject I populate the Task Approved By field by saying "give me the name of the user who modified the task which has the same name as the unique variable name (see attachment).
This technique works on all my approval workflows, but today I added another task to a State Machine, and although everything else works correctly, no matter what I do the approver is always returning as "Sharepoint App". If I look at the task list, the Modified By name is the name of the approver, and if I look at the Version History, I see the correct name of the approver.
What could possibly be happening that would cause the workflow to not pick up the name of the approver and instead pick up "Sharepoint App"?
I've rebuilt the Update List Item action, I've tried writing the approver name to a variable and then using that in the Update List Item action, and I've tried writing the approver name to the workflow history, but still it's returning as "Sharepoint App".