How to: Trigger Multiple Operations

Prev Next

When an end-user clicks a button on an application, the component selected in the Button component’s On Click setting is triggered. The process is straightforward to use. But sometimes you might want a button to trigger more than one component. Using the Button component’s Event ID setting lets you trigger multiple components from a single button-click event.

Configuration

In this how-to guide, you’ll use the Button component’s Event ID to trigger multiple components simultaneously. When an end-user clicks the button, the Username and Last 4 Digits of SSN fields become disabled so they cannot enter values. At the same time, the Name and Email Address fields become visible so they can enter values.

Click on the tab below that matches your Unqork Platform:

Configure the Panel Component

This Panel component acts as a container for the components that follow.

  1. In the Module Builder, drag and drop a Panel component onto your canvas.

  2. In the Property ID field, enter panelEvent.

  3. Click Save Component.

Configure the Button Component

Next, you'll configure the Button component that, when clicked, triggers the Decisions components you'll add later.

  1. Drag and drop a Button component onto your canvas, placing it inside your Panel component.

  2. In the Property ID field, enter btnNewUser.

  3. In the Label Text field, enter I'm a New User.

  4. From the Action Type drop-down, select Event.

  5. In the Click Event field, enter btnEventShowFields.

  6. Click Save Component.

Configure the First Text Field Component

Configure the first Text Field component for your Username field. When your end-user clicks the I'm a New User button, the field becomes disabled. You'll set up the disable function using a Decisions component later.

  1. Drag and drop a Text Field component onto your canvas, placing it above the btnNewUser Button component.

  2. In the Property ID field, enter username.

  3. In the Label Text field, enter Username.

  4. Click Save Component.

Configure the Protected Field Component

You’ll configure a Protected Field component for your Last 4 Digits of SSN field. When your end-user clicks the I'm a New User  button, this field becomes disabled.

  1. Drag and drop a Protected Field component onto your canvas, placing it between the Username Text Field and the I'm a New User Button components.

  2. In the Property ID field, enter ssnDigits.

  3. In the Label Text field, enter Last 4 Digits of SSN.

  4. Click Save Component.

Configure the Second Text Field Component

This Text Field component represents your hidden Name field. When your end-user clicks the I'm a New User button, this field becomes visible. You'll set up the visible function with a Decisions component later.

  1. Drag and drop a Text Field component onto your canvas, placing it below the I'm a New User Button component.

  2. In the Property ID field, enter name.

  3. In the Label Text field, enter Name.

  4. Set Hide Field to files (ON).

  5. Click Save Component.

Configure the Email Component

This Email component represents your hidden Email Address field. When your end-user clicks the I'm a New User button, this field becomes visible.

  1. Drag and drop an Email component onto your canvas, placing it below the name Text field component.

  2. In the Property ID field, enter emailAddress.

  3. In the Label Text field, enter Email Address.

  4. Set Hide Field to files (ON).

  5. Click Save Component.

Configure the First Decisions Component

You'll use two Decisions components to disable your Username and Last 4 Digits of SSN fields when the end-user clicks the I'm a New User button.

  1. Drag and drop a Decisions component onto your canvas, placing it below the I'm a New User Button component.

  2. In the Property ID and Canvas Label Text fields, enter ruleDisableFields.

  3. From the Trigger Type drop-down, select Watch.

  4. In the Inputs table, enter the following:

    #

    Source

    Type

    1

    buttonClick

    exact

    The buttonClick syntax is native to Unqork and looks for any button-clicks in your module.

  5. In the Outputs table, enter the following:

    #

    Source

    Type

    1

    username

    disabled

    2

    ssnDigits

    disabled

  6. In the Conditionals table, enter the following:

    #

    buttonClick

    userName_disabled

    ssnDigits_disabled

    1

    btnEventShowFields

    yes

    yes

    2

    no

    no

  7. Click Save Component.

Configure the Second Decisions Component

This second Decisions component makes the Name and Email Address fields visible when your end-user clicks the I'm a New User button.

  1. Drag and drop a Decisions component onto your canvas, placing it below your ruleDisableFields Decisions component.

  2. In the Property ID and Canvas Label Text fields, enter ruleShowFields.

  3. From the Trigger Type drop-down, select Watch.

  4. In the Inputs table, enter the following:

    #

    Source

    Type

    1

    buttonClick

    exact

  5. In the Outputs table, enter the following:

    #

    Source

    Type

    1

    name

    visible

    2

    emailAddress

    visible

  6. In the Conditionals table, enter the following:

    #

    buttonClick

    name_visible

    emailAddress_visible

    1

    btnEventShowFields

    yes

    yes

    2

    no

    no

  7. Click Save Component.

  8. Save your module.

Here’s how your completed module looks in the Module Builder:

Preview your module in Express View. You'll see the Username and Last 4 Digits of SSN fields. Once you click the I'm a New User button, those fields become disabled, and the Name and Email Address fields become visible.

In a real-life scenario, you'd add further configuration for a new user to submit their information. In this example, we’ve kept it simple to show you the functionality of an Event ID.

Configure the Panel Component

This Panel component acts as a container for the components that follow.

  1. In the Module Builder, drag and drop a Panel component onto your canvas.

  2. In the Property ID field, enter panelEvent.

  3. Click Save & Close.

Configure the Button Component

Next, you'll configure the Button component that, when clicked, triggers the Decisions components you'll add later.

  1. Drag and drop a Button component onto your canvas, placing it inside your Panel component.

  2. In the Property ID field, enter btnNewUser.

  3. In the Label Text field, enter I'm a New User.

  4. Set the Action Type as Event.

  5. In the Click Event field, enter btnEventShowFields.

  6. Click Save & Close.

Configure the First Text Field Component

Configure the first Text Field component for your Username field. When your end-user clicks the I'm a New User button, the field becomes disabled. You'll set up the disable function using a Decisions component later.

  1. Drag and drop a Text Field component onto your canvas, placing it above the btnNewUser Button component.

  2. In the Property ID field, enter username.

  3. In the Label Text field, enter Username.

  4. Click Save & Close.

Configure the Protected Field Component

You’ll configure a Protected Field component for your Last 4 Digits of SSN field. When your end-user clicks the I'm a New User  button, this field becomes disabled.

  1. Drag and drop a Protected Field component onto your canvas, placing it between the Username Text Field and I'm a New User Button components.

  2. In the Property ID field, enter ssnDigits.

  3. In the Label Text field, enter Last 4 Digits of SSN.

  4. Click Save & Close.

Configure the Second Text Field Component

This Text Field component represents your hidden Name field. When your end-user clicks the I'm a New User button, this field becomes visible. You'll set up the visible function with a Decisions component later.

  1. Drag and drop a Text Field component onto your canvas, placing it below the I'm a New User Button component.

  2. In the Property ID field, enter name.

  3. In the Label Text field, enter Name.

  4. Set Hide Field to files (ON).

  5. Click Save & Close.

Configure the Email Component

This Email component represents your hidden Email Address field. When your end-user clicks the I'm a New User button, this field becomes visible.

  1. Drag and drop an Email component onto your canvas, placing it below the name Text field component.

  2. In the Property ID field, enter emailAddress.

  3. In the Label Text field, enter Email Address.

  4. Set Hide Field to files (ON).

  5. Click Save & Close.

Configure the First Decisions Component

You'll use two Decisions components to disable your Username and Last 4 Digits of SSN fields when the end-user clicks the I'm a New User button.

  1. Drag and drop a Decisions component onto your canvas, placing it below the I'm a New User Button component.

  2. In the Property ID and Canvas Label Text fields, enter ruleDisableFields.

  3. From the Trigger Type field options, select  Watch.

  4. In the Inputs table, enter the following:

    Property ID

    Type

    buttonClick

    exact

    The buttonClick syntax is native to Unqork and looks for any button-clicks in your module.

  5. In the Outputs table, enter the following:

    Property ID

    Type

    username

    disabled

    ssnDigits

    disabled

  6. In the Micro Decisions table, enter the following:

    buttonClick

    userName_disabled

    ssnDigits_disabled

    btnEventShowFields

    yes

    yes

    no

    no

  7. Click Save.

Configure the Second Decisions Component

This second Decisions component makes the Name and Email Address fields visible when your end-user clicks the I'm a New User button.

  1. Drag and drop a Decisions component onto your canvas, placing it below your ruleDisableFields Decisions component.

  2. In the Property ID and Canvas Label Text fields, enter ruleShowFields.

  3. Set the Trigger Type as Watch.

  4. In the Inputs table, enter the following:

    Property ID

    Type

    buttonClick

    exact

  5. In the Outputs table, enter the following:

    Property ID

    Type

    name

    visible

    emailAddress

    visible

  6. In the MIcro Decisions table, enter the following:

    buttonClick

    name_visible

    emailAddress_visible

    btnEventShowFields

    yes

    yes

    no

    no

  7. Click Save.

  8. Save your module.

Here’s how your completed module looks in the Module Builder:

Preview your module in Express View. You'll see the Username and Last 4 Digits of SSN fields. Once you click the I'm a New User button, those fields become disabled, and the Name and Email Address fields become visible.

In a real-life scenario, you'd add further configuration for a new user to submit their information. In this example, we’ve kept it simple to show you the functionality of an Event ID.