How to create a stamp with an auto incrementing numeric field?


  • Target field must be in numeric format
  • Target field in numeric format, from now on called “registrytest”, CANNOT be unique.
  • Target field “registrytest” should have the option “Select list only" active.
  • The User profile which has this self-numeric stamp assigned, for more security, must have unchecked the option “modify field registry”. (Optional).

How to:

  • Create a new select list (name has to be selected by administrator user- in this example, “testselectlist”). “testselectlist” configuration must be :
  1. Kind of select list : external
  2. Source type : database
  3. Database Configuration : Content
  4. Table/View, SQL : SQL Command
  5. SQL Query: SELECT MAX(<registry>_)+1 AS <registry> From <file cabinet>. Where <registry> = “registrytest” column name, and <File cabinet>= file cabinet table name.
  6. Column to use: registrytest
  • Create a stamp ("regteststamp") in text. This stamp must contain at least one form field. This form field must be assigned the select list "testselectlist" and must change the index field "registrytest" requesting input (form field).

Before you begin, you must assign an initial value (WARNING: MUST NOT be 0!) In the "registrytest" manually in the database. Usually, 1.
After performing the steps described above, each time you use the stamp "regteststamp" and archive the document, the value will self-increment for the following document you want are storing.
1. If the stamp is set on the web basket on multiple documents WITHOUT store in the file cabinet, the code WILL NOT execute. This limitation can be overcome by defining the stamp "regteststamp" for exclusive use in the File Cabinet (DocuWare Administration-Organization - stamps-<stampname> - use only on this file cabinet)
2. If a stored document in the file cabinet and with a stamp "regteststamp" has been applied and a user reapplies the  "regteststamp" stamp, the index field will be rewritten with the value of the second stamp "regteststamp".
3. It’s not possible with this configuration statement to reset the counter every X time (for example, every day).

Comments (0)