AX1385

Executing commands on the active client spreadsheet from an Axiom form

When an Axiom form is used as a dialog within the Axiom Software Excel Client or Windows Client, it can execute commands on the active client spreadsheet by use of a Button component. Active client spreadsheet means the spreadsheet that is currently open and active in the client when the form dialog is opened.

For example, you can use the Process Action Codes command on a Button component in a form to execute action codes on the active client spreadsheet instead of in the form's source file (which is the default context for the command). The processing context for the command indicates where the command will be executed.

For purposes of this discussion, the term "dialog" refers to any use of Axiom forms within a controlled user interface. This includes using an Axiom form as a refresh form, a task pane, or as a generic dialog.

Supported commands

Only certain commands are eligible to be executed on the active client spreadsheet from an Axiom form.

Command Description Notes
Apply Form State Apply form state values to the active client spreadsheet
  • This command is only for use in Axiom form dialogs that interact with the active client spreadsheet. It has no use in standard forms.
  • The command can optionally trigger a refresh in the active client spreadsheet after form state values are applied. However, if the form dialog is used as a refresh form, the refresh always occurs when Apply Form State is used.
Close Dialog Close the form dialog
  • This command is only for use in Axiom form dialogs. It has no use in standard forms.
  • This command does not apply to form task panes. These associated task panes open and close with their associated file; they cannot be closed separately.
Goal Seek Perform goal seek calculations
  • This command can be performed on either the form source file or on the active client spreadsheet. The processing context for the command determines where it is executed.
  • When configuring the shortcut parameters for the command, the context of any cell references depend on the processing context. If processed on the form, then the cell references apply to the form source file. If processed on the active client spreadsheet, then the cell references apply to that file.
Process Action Codes Process action codes to copy or lock cells
  • This command can be performed on either the form source file or on the active client spreadsheet. The processing context for the command determines where it is executed.
  • When configuring the shortcut parameters for the command, the designated sheet and action code names depend on the processing context. If processed on the form, then these settings apply to the form source file. If processed on the active client spreadsheet, then these settings apply to that file.
Refresh Axiom Queries Trigger a refresh using various refresh options
  • This command is only for use in Axiom form dialogs that interact with the active client spreadsheet. It has no use in standard forms (because the normal form update process refreshes Axiom queries).

Commands can be executed by using either a Button component or a Button tag in a thematic Formatted Grid. However, in many cases you will want to combine commands on a single button so that you can execute the action and close the form dialog in a single button click. Because Button tags only support a single command, the Button component is more likely to be used for this particular use case.

Configuring a command to execute on the active client spreadsheet

The Processing Step for the command determines both where and when the command will be executed. This is configured in the shortcut properties for the command. The first part of the option indicates where the command will be executed, and the second part of the option indicates when the command will be executed. For example, if the processing step is Active Client Spreadsheet - After Processing, then this means the command will be executed on the active client spreadsheet, after the full form update process is complete.

In order to execute a command on the active client spreadsheet, the processing step must be prefixed by Active Client Spreadsheet. You can then choose to execute the command either Before Processing or After Processing. For some commands, the processing step is not configurable, and displays for information only.

Example command configured to execute on the active client spreadsheet

For more information on processing steps, see Timing of command execution and Axiom form update process.

Commands and form state

Usually, any use of commands on the active client spreadsheet will be performed in conjunction with sending form state values. This is because the typical purpose of the form dialog is to guide the user in making certain choices and/or inputs, and then these values are sent to the active client spreadsheet to affect the other commands being performed on the spreadsheet.

However, it is also possible to execute commands on the active client spreadsheet without any use of form state. For example, you could have a form task pane with a button that refreshes Axiom queries on the active client spreadsheet, without also sending any form state values. In this case, the form task pane would simply be presenting an alternate user interface for triggering a refresh.