Skip to main content

How do I use DocumentCUK and its associated commands to update records in Autoform DM? - Knowledgebase / Autoform DM / Autoform DM FAQs - Formpipe Support Portal

How do I use DocumentCUK and its associated commands to update records in Autoform DM?

Authors list

This article relates to Autoform DM version 9 or later. 

The Document Customer Unique Key (DocumentCUK) and its associated commands DocumentUpdate, DocumentAttach and PDMAD are used when you want to use the versioning functionality when storing documents in Autoform DM. The commands can be used to enable the following scenarios:

  • When a document has been archived you can add a new document to the previous one so both appear in the same PDF image.
  • When creating a new version so you can have several PDFs under the same keys, enabling you to choose which one to view.
  • Without the use of versioning, if you make a search on a document key that has been archived a few times you will receive multiple results returned from the search and can then choose which one to view.
  • When creating blank entries in the database which might be required for a scanning app that matches up to the blank records.
  • If there is already a document stored under certain keys, you can use these commands to update them to take on new values.
JFinder
When DocumentCUK is present in the archive job there are three possible scenarios or combinations of the PDM commands. When it is not present then no "versioning" takes place and every job is archived on its own.


This table shows how the commands should be used together:


Document CUK is set with a unique value for each DocumentDocument UpdateDocument AttachPDMADRESULT (if the entry does not exist in DB yet)RESULT (if the entry already exists in DB)NOTES
For a new Entry or Appending new images into a new revisionYY or XYA new entry is created with image attachedNew revision created with new image appended to last revision image(s)  (old images can be browsed by selecting older revisions)DocumentAttach = Y can be omitted
For a new Entry or Adding new images in their own revisionYY or XNA new entry is created with an image attachedNew revision created with only new image showing  (old images can be browsed by selecting older revisions)PDMATT = Y can be omitted
For a new "Blank Entry" or to Update keys onlyYNXA new entry is created with no archive date and no image. Useful for creating "blank" entries for a scanning app to scan againstOnly the keys are updated, no image is uploaded even if one exists in the pickup filePDMAD must not be set but can be set to N (pointless)
DocumentCUK is not set:               This is for customers who do not wish to use Versioning/updating entriesXXXA new entry is createdIf another job is sent with the same key values as an already existing document in DM then another entry is created and the user will get two results from their searchDocumentUpdate, DocumentAttach and PDMAD can be ommitted as they have no meaning and will be ignored. There are customers out there that do not use DocumentCUK as they don't want to use versioning/updates in their system


PDMAD is irrelevant for all new entries.


Lasernet Upload
DocumentCUK is set with a unique value for each DocumentDocumentUpdateDocumentAttachRESULT if entry does not exist in DB yetRESULT if the entry already exists in DB
For a new Entry or Adding new images in their own revisionTRUETRUEA new entry is created with an image attachedNew revision created with new image appended to last revision image(s)  (old images can be browsed by selecting older revisions)
For a new "Blank Entry" or to Update keys onlyTRUEFALSEA new entry is created with no archive date and no image. Useful for creating "blank" entries for a scanning app to scan againstOnly the keys are updated, no image is uploaded even if one exists in the pickup file
Adds a new record but will not update an existing oneFALSETRUENew entry is created with an image attachedDocument fails to upload due to duplicate CUK
Adds a new blank record but will not update an existing oneFALSEFALSEA new entry is created with no archive date and no image. Useful for creating "blank" entries for a scanning app to scan againstDocument fails to update keys due to duplicate CUK
DocumentCUK is not set:                     This is for customers who do not wish to use Versioning/updating entriesXXA new entry is createdIf another job is sent with the same key values as an already existing document in DM then another entry is created and the user will get two results from their search


There is no equivalent PDMAD in Lasernet Upload module.


DocumentCUK = Customer Unique Key – You should set this to a value that will be totally unique for this document, for example,

Invoice_Cust1234_11.07.2016_10.10.16. 


You can use the special jobInfos of 'FJobDate' and 'FJobDate' to add the date and time so it really is a truly unique key.

DocumentUpdate = Update – It takes a Y or N argument. If set to Y and a document already exists in the archive then that record is updated according to the value set in PDMAD or PDMATT. If set to an N and a document exists under those keys, then no action is taken and the new document is discarded.

DocumentAttach = Attachment – It takes a Y or N argument. When set to N, and there is no document already stored under those keys, it allows users to create a new blank entry in the database with no image associated with the keys. Or where an entry already exists for those keys, we can update the keys only leaving the original associated image intact.

PDMAD = Append – It takes a Y or N argument and is only relevant if a document is already stored under the same keys in Autoform DM. If set to Y then the new image is appended to the current image. If set to N then a new version is created under the same keys.


Helpful Unhelpful

Add a comment

Please log in or register to submit a comment.

Need a password reminder?

Share