Number Convention in Documentum D2

zhangj38
edited December 13, 2016 in Documentum #1

Hi All,


I have a numbering convention requirement as below which I am struggling to find a proper solution. Appreciate on any thoughts or comments on it.


The first part of numbering convention of "41000056" can be easily done by auto naming in D2. The increment of revision letter can be implemented by the OOTB method of CDFSetAttribute to loop up a dictionary. But the method can only look up the dictionary based on the revision of selected document which does not satisfy the highlighted requirement below. It needs to look up the dictionary based on the latest revision during the multiple revised documents of the original one. Creating a relationship between the original document and the revised ones could be a possible solution. But still not figure out how to find the latest revision among the revised documents.



"For an engineering drawing the numbering convention is as follows:

NNnnnnnn_YY e.g. 41000056_B

Where NN is two digit prefix denoting the type of drawing, nnnnnn is a six digit sequential number (padded with leading zeros and YY are capitalized letters denoting the revision.  The revision will start A to Z, beyond Z it will progress to AA, AB,..,AZ,BA,BB,..BZ,CA,CB..., etc.

A new drawing number will have a new number (unique for that drawing type across the entire repository) and default to revision A.

A revised drawing number will keep the same number, but increment the revision letter to the next available letter for that number. For example if the user wishes to revise 41000001_A but it has been previously revised elsewhere such that there is already a 41000001_B, then the user revising drawing 41000001_A should create revision 41000001_C."


Cheers,

Joe

Tagged:

Comments

  • DCTM_Guru
    edited December 13, 2016 #2

    You need to write a function convert the letters to numeric value.  Luckily you can use ASCII value to convert A to 32.  You will have to account for AA as 32+32= 64

    Once you have the numeric values, you can query across all versions for this numeric value and increment by one.