Friday, January 14, 2011

SharePoint 2010: Version History for Multiline text column with “Append Changes to Existing Text” not visible in SharePoint 2010 Custom Edit forms

Problem Statement:
If you have created a Multiline textbox with “Append Changes to Existing Text”
This will display a version history for that column in default Edit and Display form, but the same thing won’t work in the custom edit and display forms.
Solution:
Add tag below the text fields control with Control mode “Display” and unique Id.
<SharePoint:AppendOnlyHistory runat="server" id="ff21disp{$Pos}" controlmode="Display" fieldname="Comments "></SharePoint:AppendOnlyHistory>

11 comments:

  1. this was very useful article ..solves my problem

    ReplyDelete
  2. How can I add this to a default view? I am having issues when I export to a excel iqy spreadsheet. The data doesn't seem to want to show up.

    ReplyDelete
  3. It wont be displayed in the exported spreadsheet, as its a version column. If you still wants to display the data, then you have to create another column which reflects the latest data of that column. You can use calculated column or update the latest value using the code.

    ReplyDelete
    Replies
    1. Can you tell me how you assign the latest version to a calculated column?
      I have an append changes column called "Comments" and a calculated column called "Latest Comment".
      When defining the formula field of "Latest Comment" I put in an entry of
      =[Comments]
      but when save the change receive an error message.

      Delete
  4. Thanks for the 2010 contribution. Any way to do this in 2007?

    ReplyDelete
  5. You just made my day!! Thanks for the Append History tag.

    ReplyDelete
  6. How does this work with the custom display form? I got the edit form, but I can't figure out how to do it with the display form. Can someone help me, please?

    ReplyDelete
    Replies
    1. You can use <xsl:value-of select="@Title" />to display any field value in display form.

      Delete
    2. That didn't work. I had to add "" after "" and it worked perfectly.

      Delete
    3. How do you refer to the AppendOnlyHistory in the Display form? It's all done with XSL.
      Can you show how you actually did it?

      Delete
  7. Great and I have a tremendous give: Who Does House Renovation house renovation services

    ReplyDelete