1

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.

2 Answers 2

0

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.

1
  • That's a bummer:(
    – Shaji
    Feb 15, 2013 at 20:50
0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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