OnDemand User Group

Off Topic => General => Topic started by: msnathan on May 11, 2015, 08:02:38 AM

Title: storing multiple versions of the document and retrieve the latest version
Post by: msnathan on May 11, 2015, 08:02:38 AM
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
Title: Re: storing multiple versions of the document and retrieve the latest version
Post by: Greg Ira on May 12, 2015, 06:52:16 AM
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.
Title: Re: storing multiple versions of the document and retrieve the latest version
Post by: Justin Derrick on May 13, 2015, 03:33:10 AM
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.
Title: Re: storing multiple versions of the document and retrieve the latest version
Post by: ewirtz on May 17, 2015, 11:51:15 PM
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
Title: Re: storing multiple versions of the document and retrieve the latest version
Post by: msnathan on June 03, 2015, 12:42:52 PM
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.