AX1292
Apply Form State command
Use the Apply Form State command to send the current form state values from an Axiom form to the active spreadsheet in the Excel Client or Windows Client. After the values have been sent, the spreadsheet file is refreshed. For more information on using form state, see Passing values between an Axiom form and the active client spreadsheet (form state).
Can be used in
- Axiom forms
Apply Form State is only for use when the Axiom form is used as a dialog or task pane. Apply Form State has no effect on a regular Axiom form.
When the Apply Form State command is selected from the Command Library as the shortcut target, it displays as command://ApplyFormState or command://ApplyFormStateCommandAdapter (legacy syntax).
Shortcut parameters
This command uses the following shortcut parameters:
Item | Description |
---|---|
Refresh mode |
The refresh action to perform on the active client spreadsheet after form state values are sent.
NOTE: This parameter is ignored when the Axiom form is used as a refresh dialog. A refresh is still triggered, however, the command honors the refresh context that caused the Axiom form to display as a refresh dialog. For example, if the user selected to refresh the active sheet only, then the command will refresh the active sheet only, regardless of the refresh mode setting. |
Processing Step |
Specifies when the command will be executed during the Axiom form update process. This option is set to Active Client Spreadsheet - After Processing and cannot be changed. For more information, see Timing of command execution and Axiom form update process. |
Visibility
In Axiom forms, the command used does not impact whether the button is visible or enabled.
Remarks
-
Close behavior: If you want to automatically close the dialog after applying the form state values to the active client spreadsheet, then you must add a Close Dialog command to the same button, to be executed after the Apply Form State command.
-
Form state update behavior: When the form state values are sent from the Axiom form to the active client spreadsheet, the following actions are taken to the form state memory of the active client spreadsheet:
- Any form state keys that exist in the Axiom form but do not exist in the client spreadsheet file are added.
- Any form state keys that exist in both files are updated to match the values in the Axiom form.
- Any form state keys that exist in the client spreadsheet file but not in the Axiom form are left as is.
In other words, the form state of the active client spreadsheet is not cleared and replaced by the form state of the Axiom form. Instead, the Axiom form adds missing values and updates existing values.