Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I had a series of lists with forms for users to submit various items of information and requests. The OOB Approval – SharePoint 2010 worked great, except for the email messages. The department that wished to use these forms wanted specific verbiage and information in each email message sent out. So, I created a new Globally Reusable Workflow based off of the original Approval – SharePoint 2010 workflow in SharePoint Designer 2010.

The workflow and notifications all work great! The only issue I still have outstanding is the email message that gets sent to the end user with either an Accepted or Rejected notification. In this message there is a field called [%Task Process:Consolidated Comments%]. This displays the information that the approver places into the approval form. It has much more information than we want to send to the initiator (end user).

All I want is the Comments field that the approver places information into. I have had no luck finding where this field is defined!

Here is the data that is sent through the email notification to the end user:

`[Name of Form] Submission review has been completed.

Your submission for an [Form Name] has been completed. Your submission has been successfully completed.

Comments: Approval Workflow started by [Approver] on 1/5/2012 8:29 AM Comment: A [Form Name] request has been submitted. Please review and approve/deny. Thanks!

Approved by [Approver] on 1/5/2012 2:34 PM Comment: All I want the end user to receive is whatever the Approver places into this field.

(Click HERE to view your previously submitted form.) ` The area above in block quotes is what is placed into the email when using the [%Task Process:Consolidated Comments%] field. The Italicized area is the extra information that I do NOT want and the bold area is the information I DO want. I need to find the variable or string that this is associated to?

Is there anyone out there that has experience with this kind of situation?

share|improve this question
add comment

3 Answers

You can write your custom workflow activity, and do whatever you need using C#. I would recommend you to create a very simple activity which receives the Consolidated Comments field value, and returns it's "fixed" value into some workflow variable. Then, you can use this variable value in the email.

You can even create sandboxed workflow action, so that your solution will work even in Office 365. Actually it is very simple. The process is thoroughly described in the following MSDN article:

Also, there is a good article on the same topic from Wictor Wilén: http://www.wictorwilen.se/Post/Sandboxed-workflow-activities-in-SharePoint-2010.aspx

share|improve this answer
    
Is there a way to do this simply with SharePoint Designer 2010 or do I have to go into the code?? Thanks! –  Pedro Jan 9 '12 at 19:57
add comment

Old post but I do not see the simplified option:

The item called "Comments" that we seek is not available in when editing Approval "Overall behavior view" view but is accessible when you edit the workflow via "Change the behavior of a single task". It is under [Current Task: Comments] along with any other field we should need.

share|improve this answer
add comment

I know this is old, but it's the top result in a google search and I haven't seen this solution posted anywhere, so I'll share my work-around that doesn't need code.

I just saved the comment of a specific task to a local variable and replaced the consolidated comments variable in the email to the workflow initiator.

Note that this will only work when there's a single approver unless someone knows how to concatenate local string variables in SPD.

  • In the custom approval process, select 'Change the behaviour of a single task'
  • Scroll down to the bottom step called 'When a task completes'
  • Set an action where you save the task comments to a local variable. 'Set Variable:TaskComment to CurrentTask:Comments'
  • Go back to the custom approval process, and select 'Change the behaviour of the overall task process'
  • Scroll down to the bottom step called 'When the task process completes'
  • Click on the Email:Workflow context:Initiator text
  • Delete the part of the email containing the ConsolidatedComments variable, and insert the TaskComments variable instead.
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.