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

Note

As Lasernet output requires the DM Upload output module of Lasernet, this article relates to both Autoform DM and Lasernet versions 9 or later. 

The Document Customer Unique Key (DocumentCUK) and its associated commands DocumentUpdate and DocumentAttach 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, you can have several PDFs under the same keys, enabling you to choose which one to view.

  • Without the use of versioning, if you search for 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 Document

Document Update

Document Attach

RESULT (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 revision

true

true or false

A new entry is created with image attached

New 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 revision

true

true or false

A new entry is created with an image attached

New revision created with only new image showing  (old images can be browsed by selecting older revisions)


For a new "Blank Entry" or to Update keys only

true

false

A new entry is created with no archive date and no image. Useful for creating "blank" entries for a scanning app to scan against

Only the keys are updated, no image is uploaded even if one exists in the pickup file


DocumentCUK is not set:               This is for customers who do not wish to use Versioning/updating entries

false

false

A new entry is created

If 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

DocumentUpdate and DocumentAttach can be omitted as they have no meaning and will be ignored. Some customers do not use DocumentCUK as they don't want to use versioning/updates in their system



Lasernet Upload

DocumentCUK is set with a unique value for each Document

DocumentUpdate

DocumentAttach

RESULT if the entry does not exist in DB yet

RESULT if the entry already exists in DB

For a new Entry or Adding new images in their own revision

true

true

A new entry is created with an image attached

New 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 only

true

false

A new entry is created with no archive date and no image. Useful for creating "blank" entries for a scanning app to scan against

Only 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 one

false

true

New entry is created with an image attached

Document fails to upload due to duplicate CUK

Adds a new blank record but will not update an existing one

false

false

A new entry is created with no archive date and no image. Useful for creating "blank" entries for a scanning app to scan against

Document fails to update keys due to duplicate CUK

DocumentCUK is not set:                     This is for customers who do not wish to use Versioning/updating entries

false

false

A new entry is created

If 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


DocumentCUK = Customer Unique Key – You should set this to a value that is unique for each document, for example,

Invoice_Cust1234 . The DocumentCUK should not contain any date or time value as it will not match with existing documents in DM. For example, for invoices, the best value would be the invoice number. This makes it easier to handle versioning of the invoice.

Use the jobInfos FJobDate and FJobDate to add the date and time to ensure it is a truly unique key.

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

DocumentAttach = Attachment – It takes a true or false argument. When set to false 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. Where an entry already exists for those keys, we can update the keys only leaving the original associated image intact.



Helpful Unhelpful

Add a comment

Please log in or register to submit a comment.

Need a password reminder?

Share