Introduction to Triggering Operations Using the Button Component

Overview

Using a Button component, you can trigger any operational component. This allows your end-user to begin the configured operation with the click of a button on your application.

Here are few components a Button can trigger:

What You'll Learn

In this article, you'll learn how to use a Button component to trigger a component.

When to Trigger Operations Using a Button Component

There are dozens of cases where you can use a Button to trigger operations. A few examples include:

  • Using a Button to trigger a Calculator component after your end-user enters their information. This ensures all the necessary input is there before the Calculator runs.
  • Using a Button to trigger a Plug-In component's Create Submission or Update Submissions API (application programming interface) call.
  • Adding custom navigation Buttons to your module. The Buttons can trigger Initializer components that trigger a Navigation component.
  • When you want to improve your application's performance—having many Decisions or other components set to a Watch Trigger Type slows down a page's load time.

How to Trigger Operations Using a Button Component

At the basic level, here's what you'll do to manually trigger a component using a Button component:

1. In the Module Builder, drag and drop a Decisions Component icon Button component onto your canvas.
2. From the Button component's navigation menu, select Actions Icon Actions.
3. Set the Action Type The action performed by the button when selected. to Event.

You can use the On Click field with any Action Type selection. Here, we've selected Event, but you could use Save, Save Draft, Validate, or Reset depending on your use case. For more information on these Action Types, you can read the Button component article in our Documentation Hub.

4. In the On Click Enter the Property ID of the component that you want to trigger on each button-click. field, enter the Property ID A Property ID is the unique field ID used by Unqork to track and link components in your module. of the component you want to trigger.
5. Click Save & Close.
6. Save your module.

Let's look at an example. You can see the basic configuration that triggers a  Calculator component called calcAge.

The Action Type The action performed by the button when selected. is set to Event and, in the On Click field, the Calculator's Property ID A Property ID is the unique field ID used by Unqork to track and link components in your module.calcAge, is entered.

After saving both components, your Calculator will only run after the end-user clicks the Button.