Author Topic: storing multiple versions of the document and retrieve the latest version  (Read 4315 times)

msnathan

  • Newbie
  • *
  • Posts: 2
    • View Profile
Does CMOD support storing multiple version of the document natively (or) do I need to create an attribute for version and manage at the application level.

Are there any best practices for storing multiple versions of the same document

Greg Ira

  • Full Member
  • ***
  • Posts: 240
    • View Profile
If I understand your question correctly the answer is yes, that is what CMOD does.  It will store multiple versions of the document as they're loaded.  It doesn't natively do versioning in the sense that only the most recent version is available.  That you would have to put in controls for or simply capture the load date and retrieve the last version loaded.

Justin Derrick

  • IBM Content Manager OnDemand Consultant
  • Administrator
  • Hero Member
  • *****
  • Posts: 2229
  • CMOD Guru for hire...
    • View Profile
    • Tenacious Consulting
As long as you do a 'Load Date' field, and put a 'max(load_date_field_name)' in the query restriction, that would work, but you'd only ever be able to get the latest version -- someone would belong to a separate group in order to not have the restriction.

Let us know what your solution looks like when you're done!  :D

-JD.
IBM CMOD Professional Services: http://TenaciousConsulting.com
Call:  +1-866-533-7742  or  eMail:  jd@justinderrick.com
IBM CMOD Wiki:  https://CMOD.wiki/
FREE IBM CMOD Education & Webinars:  https://CMOD.Training/

Interests: #AIX #Linux #Multiplatforms #DB2 #TSM #SP #Performance #Security #Audits #Customizing #Availability #HA #DR

ewirtz

  • Full Member
  • ***
  • Posts: 134
    • View Profile
Hi,
one possibility is to use an index exit. Using a status field you can mark all loads loaded before as invalid within the index exit. The assumption is that the different loads have the same database content besides the status field and that these database fields identify the different versions of the document completly.

regards Egon

msnathan

  • Newbie
  • *
  • Posts: 2
    • View Profile
Thanks for all the suggestions.

Our development team reached out to me saying max(load_date_field_name) won't work and they are getting the following error when they manually enter the MAX function in the sql window.

Error:  The server failed during a search operation.

  Does SQL functions ( MAX, AVG etc., )  are supported in CMOD query restriction ?

  Meanwhile the team reached out to IBM and they got back saying whenever a particular index value is selected we can only use the operators that are listed in the  operator symbols pane and it doesn't show any sql functions.