AX1369
Configuring close options for a form dialog
When a form is open as a dialog in the Excel Client or Windows Client, you can use the Close Dialog command on a Button component, to provide end users with a button or buttons that close the dialog.
NOTE: This command only applies to form dialogs, such as refresh forms or forms that are opened via Show Form Dialog (either the command or the function). If the command is used in any other form context—such as in a form task pane, or in a form opened in the Web Client browser—the command is ignored.
Typically, software dialogs have two buttons that can be used to close the dialog. To illustrate the purpose of these buttons, they will be referred to as the "OK" button and the "Cancel" button (though you can label the buttons using any text).
-
OK button: This button is used to perform an action and close the dialog. The action could be to save data to the database, or to apply form state values to the active spreadsheet file. In this case, the user has decided that they are finished making choices in the dialog, and now they want those choices to be used and the dialog to be dismissed.
-
Cancel button: This button is used to close the dialog without performing any action. In this case, the user has decided that they do not want to perform any action, and they simply want the dialog to be dismissed.
You can have variations of these buttons depending on the purpose of the dialog. For example, you could have an "Apply" button that performs the action but leaves the dialog open. And you could decide not to have a Cancel button, and instead require the user to cancel out of the dialog by clicking the X button on the title bar.
Configuring Close Dialog for an OK button
When using the Close Dialog command for an OK button, keep in mind the following:
-
The processing step for the command must be set to Active Client Spreadsheet - After Processing. This means that the full form update process will be performed in addition to closing the dialog, thereby allowing other actions to be executed.
-
If the button uses any other commands that will be run at the same processing step, you do not need to worry about the order of these commands. The Close Dialog command is always performed first at this processing step, however, any other commands will still execute after the dialog is closed.
Configuring Close Dialog for a Cancel button
When using the Close Dialog command for a Cancel button, the processing step for the command must be set to Active Client Spreadsheet - Before Processing. This means that the dialog will be closed before the normal form update process occurs, thereby aborting the form update process. No actions will occur.