HomeGuidesRecipesAPI
HomeGuidesAPILog In

Action Button

❗️

Contact your sales representative if you are interested in obtaining a license for the Action Button Module for your SmartIQ environment.

The Action Button question provides a simple button interface that triggers one or more Actions when clicked. This is useful in a range of situations where Actions are needed before a form is submitted, or for dashboards that do not even allow submission.

For example, you might use an Action Button to trigger an Email Action to send an email on demand with the click of a button, or to execute an update to a back-end data system such as SQL Server or Dynamics 365. You can even add multiple Actions in a sequence to trigger many events from a single button click.

The Run Action Button can be used to trigger any built-in or custom Action, except those that rely on returning their own user interface as those will only render on the Finish page after submission of a form. See below for details on which built-in Actions are supported by the Action Button question type.

🚧

The Action Button only works with an internet connection

The Action Button is supported on mobile apps, however it can only be used in online mode. If the app is in offline mode, the Action Button will be disabled.

🚧

Mobile app Actions can't modify the Wizard object

Any action that modifies the Wizard object will not work on the mobile apps. As actions are run server side, SmartIQ only passes back the result and the action outputs.

Usage

The Action Button question acts like a container for one or more Actions, much like the Finish page. To add to your project, simply drag the Action Button question onto the project via the questions palette. Add the question into the desired location in the project or Pages Panel

Properties

Once you've added the question onto your form use the properties panel to set up the question. You can use Functions and Conditions to dynamically alter text and other properties.

PropertyDescription
Button TextEnter text to display on the button itself to end users.
Class NameLeave blank for default button styling, or add CSS class names. Example styles available include 'btn-info', 'btn-warning' and 'btn-danger'.
Form ValidationTick to enforce form validation before executing actions. This may be important to ensure values entered in the form that might be used as input parameters on Actions are valid. Default is unchecked. Note: validation will apply to any question or page that appears before the Run Action Button question, so that future unseen questions do not incorrectly appear invalid.
StyleIf required, select a named style from the drop-down list.

In order to associate an Action with the Action Button, drag any required Actions from the Actions panel and drop them onto the Action Button question. Actions will be executed in order, from the first to last in the list associated with the Action Button. The actions below will execute in this order; Set Custom Property, Send Email, Zip, WDO Override, Form Summary.

Once associated, each Action may expose its own Action Properties that need to be configured. For example, if you add the Send Email Action, you will need to add properties to specify the email recipient, subject and body. Refer to the desired Action's documentation for further information on specific properties.

Supported Actions

The Action Button will work with Actions that operate completely in the background, with no user interface. Most built-in actions operate in this way and are supported, however there are some that will not work.

As a general rule of thumb only actions with the "Run Action" property are usable by the Action Button, the "Show Action" property is not usable by the Action Button. Actions with both of these properties will only have the Run Action component, of the action, run by the Action Button.

Any built-in, third party, or custom Actions must work without needing to provide a user interface in order to work with the Action Button, as these action user interfaces can only render on form submission.

References

The best way to reference a Action Button output is 'Question.Action.Output'

[q1.Save to Disk.Output Folder]

You can also reference the result of a Action Button. The result of a Action Button is the cumulative result of the nested actions. The return types are:

  • Success
  • Fail
  • NotRun
[q1.result]

You can also reference the result of an individual action result

[q1.Save Copy.result]