AX1128

Processing action codes in an Axiom form

You can process action codes in an Axiom form by using the Process Action Codes command.

Action codes are always processed as normal in the form source file when Axiom queries are run or when a calc method is inserted. This command provides a way to process action codes "on demand" regardless of whether Axiom queries or calc methods are used in the sheet. This command is also the only way to process named ActionCodes tags.

NOTE: This topic discusses action code processing in a standard Axiom form, to process action codes on the form source file for the purpose of impacting the form displayed to the user. If you are using an Axiom form as a dialog in the Excel Client or Windows Client, then you can optionally use this command to process action codes on the active client spreadsheet instead of within the form source file. For more information, see Using Axiom forms as custom dialogs and task panes in the Desktop Client and Executing commands on the active client spreadsheet from an Axiom form.

Requirements

Action codes must be set up in the form source file, in the specified sheet. If no action codes are present, then an error will be presented to the Axiom forms user when they trigger the command.

Setting up action code processing for an Axiom form

To allow users to process action codes from the Axiom form, you use a Button component that is configured to run the Process Action Codes command shortcut. This is the same command that is available for use in task panes.

To start off, add the component to the Axiom form canvas and then configure the properties as desired. You can then configure the Command for the component as follows:

  1. In the component properties, click the [...] button to the right of the Command box.

  2. In the Shortcut Properties dialog, click the [...] button to the right of the Shortcut Target box.

  3. In the Axiom Explorer dialog, select the Command Library, then select Process Action Codes, then click Open.

    In the Shortcut Properties dialog, the Process Action Codes command is now listed as the shortcut target, and the relevant shortcut parameters are now available.

  4. Complete the shortcut parameters as follows:

    Parameter Description
    Sheet Name

    Specify the sheet for which to process action codes.

    Make sure to specify a sheet name when using this command in Axiom forms. If this parameter is left blank, then action codes will be processed on the current sheet, which in this context means whichever sheet was active when the source file for the Axiom form was last saved.

    Action Codes Tag Name

    Optional. Specify the name of the ActionCodes tag that you want to process.

    To use this option, the sheet must contain an ActionCodes tag with a matching name. For example, if you enter MyName, then the sheet must contain a tag as follows: [ActionCodes:MyName].

    The processing behavior is as follows:

    • If a tag name is specified, then only the action codes defined in that tag's control row and control column will be processed. If the sheet contains other ActionCodes tags (named or not), they will be ignored.
    • If no tag name is specified, then all action codes will be processed except those belonging to named ActionCodes tags.

    Processing Step

    Optional. Specify the desired Processing Step for the Process Action Codes command. By default, this is set to After AQ Refresh, which means that the Process Action Codes command will be performed after Axiom queries have been refreshed in the source file.

    If desired, you can specify a different point in the refresh process for the Process Action Codes command. For more information on when each process step occurs during the form refresh process, see Axiom form update process.

    Example Shortcut Properties dialog

  5. Once you have finished configuring the Shortcut Properties, click OK to close the dialog and return to the component properties.

Within the Axiom form, the user can click the button to perform the Process Action Codes command. Action codes will be processed at the specified processing step, and then the Axiom form refresh process will continue as normal. Remember that unnamed action codes are always processed when Axiom queries are run, so if any Axiom queries are run as part of the normal form refresh, those action codes will be processed at that point.

Action code behavior notes

When the Process Action Codes command is performed in the Axiom form environment, a calculation is performed before action codes are processed and then after action codes are processed. This means that you can set up your action codes with dynamic formulas, and those formulas will always calculate before action codes are processed, regardless of the selected Processing Step for the command.