Trigger an action with the Button Wizard

This exercise describes how to use the Button Wizard to trigger an action when the button on a form is pressed.

To open an object on the click of a button:

  1. Select the button and then select Run Wizard from the control drop-down menu:
  2. On the Action page of the Button Wizard, select Open a Micromine Geobank Object:
  3. Note: Opening an object or no action (to remove the behaviour) are the actions offered, Additional actions may be added in later versions.

    Click Next.

  4. On the Target page of the Button Wizard, select the object you want to open:
  5. Click Next.

  6. On the Parameters page of the Button Wizard, map the parameters used by the target object, to the parameter values that will be entered or selected in the form. See: Mapping object parameters to form parameters
  7. This step is skipped when parameters are not required.

  8. On the Finalise page of the Button Wizard, review the properties of the button:
    1. Enter a Text label for the button (this should be short but descriptive). This is the "Content" property of the button.
    2. Enter a Name for the button (this should not contain spaces and should uniquely identify the button so that it is easy to reference in a Python Script).
    3. (Optionally) Use the drop-down box to select the Target Database to use for this task. If Inherit is left as the default, the database used is inherited as the database against which the form is executed.

    Click Finish.

  9. Save your changes and click Run to run the form:
  10. When you click on the Button, the “Substitution Parameter” dialog will prompt you to specify any values not supplied from the form:

    Note: This step is skipped if:

    • the target object does not have parameters
    • all parameters of the target object have been supplied from values in the form

    Specify the required parameters and click OK.The target object (in this example a chart) is actioned:

Trigger an action from a button click event