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 am building a sharepoint 2010 list for my team. I dont have global admin rights so I cant do anything programatically because it comes back and tells me I dont have rights.

I am creating custom email alerts and adding them to my workflow. In my email, I would like to pull in the new comment and the previous comment (yes, comments are versioned).

,<td class="formbody">[%CurrentItem:Comment%]

I can't seem to figure out which field source to use to pull in the last or all comments including the current comment. The only options I have are "is current version," "UI Version," and "version." However, when I try all of them, I dont get a result. My data source is "CurrentItem."

Any help would be highly appreciated.

share|improve this question

2 Answers 2

up vote 0 down vote accepted

Unfortunately, this isn't possible. The SharePoint Designer workflows have a specific set of data they have access to (which is what you are seeing). In order to obtain the content from previous versions of the item, you would need to use the SharePoint Object Model (via C# or Web Services) to get the data. In either case, you would need custom code to get that into a workflow.

share|improve this answer
    
That's a bummer:( –  Shaji Feb 15 '13 at 20:50

How about creating a new column in your list named 'Previous Comment'. Set your workflow to run every time an item is created or modified. As the first step, set a variable in your workflow equal to the value in 'Previous Comment'. Then, add a condition to check if 'Comment' is equal to 'Previous Comment'. If it is not equal copy the value in 'Comment' to 'Previous Comment'. Then, when you send your email you have both the value in the 'Comment' field (the latest comment) plus the value in your variable (the previous one). Do some checking so that if the previous comment is empty display 'no other comments...' or something like that.

You could then use the Lists web service to hide the 'Previous Comment' field so users don't get confused.

Not ideal, but may get the job done.

share|improve this answer

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.