Wednesday, July 30, 2014

Keeping It Current… Showing Only the Latest Revision on the Document Information Page

One request that comes up from time to time is a need to remove all of the non-latest
revisions from the list at the bottom of the document information page in Content
Server. This is useful to restrict the access to older versions of the item without
actually deleting the older items.

Typically, most implementers say that a customization is necessary. However, a
relatively simple profile rule can be created to accomplish the same thing.

This article assumes that the reader has a basic working knowledge of how to create
content profiles in Content Server. For this article, a global rule is being created, but it
could easily be adapted to only fire for specific profiles.


  • Create a global rule with activation conditions of “OnRequest” and “Info” as shown.


  • Clicking on the “Edit” button, and then on the “Side Effects” tab, enter the following code in the custom code box as shown:

<$loopwhile REVISION_HISTORY.#numRows >1$>

<$exec rsSetRow("REVISION_HISTORY",REVISION_HISTORY.#numRows-1)$>
<$exec rsDeleteRow("REVISION_HISTORY")$>
<$endloop$>




  • To adjust the number of revisions shown on the page (for example, showing 5 revisions as opposed to only 1), change the value of 1 in the statement 
    "<$loopwhile REVISION_HISTORY.#numRows >1$>"
    to the appropriate number.
Big thanks to William Phelps for today's post!

-ryan