0

I am using content approval on a piece of content and have a 2010 workflow that waits for the Approval Status to turn Approved. I then want to capture the approver in a new field called "Approved by".

My workflow has to run in Impersonation Step. I have tried to get Workflow Context:Current User but this always only returns the person who created the workflow.

Is there another way to capture the person who has approved the content?

  • Is it a list workflow? which form are the users using to set the approval status? – HarryB Nov 26 '15 at 17:20
  • It is a list workflow. The approval is using the OOTB "content approval" on the list. Under List Settings > Require content approval for submitted items? = Yes. This adds a "Approve/Reject" button on the list forms (default and custom list forms). When someone Approves there is an Approval Status column that gets set to Approved. I want to capture the user who approved. – Maureen Nov 26 '15 at 19:28
  • Have you tried storing the current user in a workflow variable before entering into the impersonation step? – HarryB Nov 26 '15 at 22:58
  • The problem with that is the workflow is initiated when the item is created, and then goes into a "Wait for Approval Status to not equal Pending". Then a different user goes in and changes the approval status. So, if I stored the current user in the workflow variable in a previous step I would only be getting the user who created the item, not the user who is approving it, during the "wait" portion of the impersonation step. – Maureen Nov 27 '15 at 21:20
  • I have always made use of list event receivers whenever I have run out of options with the designer workflow solutions. To keep things simple: first review the permissions on the list or create a custom permission level to see if you can get rid of the impersonation step or limit its scope. If you really need to keep the impersonation step then you can attach an ItemUpdating item event receiver and use before and after properties of an item to check if the status has changed. – HarryB Nov 28 '15 at 16:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.