How Do I Use DocumentCUK and Associated Commands to Update Records in Autoform DM?
    • 16 Oct 2024
    • 4 Minutes to read
    • Contributors
    • PDF

    How Do I Use DocumentCUK and Associated Commands to Update Records in Autoform DM?

    • PDF

    Article summary

    Note

    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, several PDFs under the same keys enable you to choose which one you want 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

    PDMAD

    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

           Y

       Y or X

        Y

    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).

    DocumentAttach = Y can be omitted

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

           Y

       Y or X

         N

    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).

    PDMATT = Y can be omitted

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

           Y

           N

         X

    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, and no image is uploaded, even if one exists in the pickup file.

    PDMAD 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 entries

           X

           X

         X

    A new entry is created

    If another job is sent with the same key values as an existing document in DM, another entry is created, and the user will get two results from their search.

    DocumentUpdate, DocumentAttach, and PDMAD can be omitted as they have no meaning and will be ignored. There are customers out there who do not use DocumentCUK because they do not want to use versioning/updates in their system.

    Note

    PDMAD is irrelevant for all new entries.

    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. This is useful to create "blank" entries for a scanning app to scan against.

    Only the keys are updated, and

    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

    A 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 without an archive date or an image. This is 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

                X

                X

    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.

    Note

    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, making it 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, that record is updated according to the value set in PDMAD or PDMATT. If set to N and a document exists under those keys, no action is taken, and the new document is discarded.

    DocumentAttach = Attachment - It takes a Y or N argument. When set to N, and no document is already stored under those keys, users can create a new blank entry in the database with no image associated with it. 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, the new image is appended to the current image. If set to N, a new version is created under the same keys.


    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.