AX1087

Process Document command

Use the Process Document command to initiate document processing from within an Axiom form, and have the form wait for the processing to complete before updating itself. The processing occurs synchronously during the specified processing step, in the background. The data resulting from the save is immediately available and can be shown in the form (depending on the processing step and the form configuration).

Can be used in

  • Axiom forms

When the Process Document command is selected from the Command Library as the shortcut target, it displays as command://ProcessDocument.

Shortcut parameters

This command uses the following shortcut parameters:

Item Description

Document

The document to process when the command is executed. The document must be a spreadsheet Axiom file.

You can specify the document using either of the following options:

  • Click the [...] button to open Axiom Explorer and browse to select a file. The path for the selected file will be written as a document shortcut.

    NOTE: If you browse to the file through the File Group Alias node, then the path to the document will be written using file group alias syntax. The specified document will be found within the current target of the file group alias.

    OR

  • Enter a cell reference in brackets to read the document path from that cell. For example: [Variables!J24]

    If you use this option, the referenced cell should contain a full path to the file using document shortcut syntax. For example:

    document://\Axiom\Reports Library\Budget Reports\Budget Comparison.xlsx

    Alternatively, you can specify a document ID in the referenced cell.

Processing step

Specifies when the command will be executed during the Axiom form update process.

By default, this option is set to Form - After Save Data. You can change this to a different processing step as needed. For more information, see Timing of command execution and Axiom form update process.

NOTE: The After Save Data processing step is only honored during the form update process if the form saves data to the database using a "spreadsheet save" (Save Type 1 or Save Type 4). If the form does not save data to the database, this step is skipped, which means the command will not be executed. You should select a different processing step, such as Form - After Updating Values, if you want to use this command when you are not saving data from the form.

Document variables

You can define one or more optional Document Variables to pass to the target document. The values for these variables can be used to impact the target document in some way, such as to filter a query or to display in header text.

To define document variables:

  • Click the plus button to add a new variable/value pair to the Document Values section.

  • In the left-hand box, type the name of the variable. For example: Account.

  • In the right-hand box, type the value to be used for this variable, or enter a cell reference in brackets to read the value from that cell. For example: [Variables!J24].

To use the variable value in the target document, that document must have a GetDocumentInfo function to return the variable value. For example, if the variable is named Account, the function GetDocumentInfo("Variable","Account") will return the variable value passed in from the parent form.

Processing behavior

When the command is executed, the following occurs:

  • The specified document is opened in the background. This process is transparent to the user.
  • Document variable values are passed to the document.
  • Active Axiom queries configured to Refresh on Open are processed, followed by Axiom queries configured to Refresh During Document Processing. (If DataLookups are present in the document, they are processed as normal depending on their configuration.)
  • A save-to-database is executed from the file.

The processing occurs synchronously, during the specified processing step. Effectively, this means that the form update process waits for the document processing to complete before moving on to the next step. The data saved from the target document is available to be displayed in form components that are updated during a later processing step.

For example:

  • If you have a Formatted Grid that is populated by an Axiom query, you can query and display the saved data if the command is configured to execute at the After Updating Values processing step or earlier.
  • If you have a Data Grid or a Fixed Report, you can query and display the saved data if the command is configured to execute at the After Save Data processing step or earlier. In this case, remember that the component used to trigger the command must be listed as a Component Dependency for the grid or report.

Visibility

In Axiom forms, the command used does not impact whether the button is visible or enabled.

Remarks

The Process Document command cannot be triggered from a KPI Panel.