Initializer Component

 

Overview

The Initializer component is one of Unqork's core logic components. Initializers trigger operations based on an end-user's interaction with components and modules. Initializer component can be set up to trigger an operation with each new module submission.

While similar, Initializers and Decisions differ in how they handle inputs. A Decisions component relies on specific input values (if an end-user responds yes to a question, the Decision triggers). Initializers, on the other hand, trigger on actions (such as a button-click or a new submission on a page).

To trigger an operation based on an action instead of a value, use the Initializer component.

The Initializer component is in the Data & Event Processing group to the left of the Module Builder.

What You'll Learn

After completing this article, you’ll know when to use an Initializer component, how to configure its settings, and how to use it in an Unqork application.

About the Configuration Window

To learn more about general component settings and those that display when a component is associated with Data Models, view our General Component Settings article.

Field Text

A static displaying the Initalizer Component's Display settings.

Setting

Description

Canvas Label Text

Label Text conveys what the input component is and what information it displays. Enter the purpose of the corresponding component or field.

User-friendly labels make your module more accessible. Keep labels short and descriptive (a word or two) using title case. For longer entries, use sentence case.

In this example, you'll learn how to set up an Initializer component without configuring the Input table. Instead of referencing the Input table, your Initializer watches for new submissions. With each new submission, your Initializer fires the value yes to a series of Radio Buttons.

These instructions assume that you have an open module saved and with a title.

What You Need

For this configuration, you need the following components:

Configure the Radio Buttons Components

Start your configuration by adding two Radio Buttons components. These Radio Buttons serve as the output location for the Initializer component.

The first Radio Buttons component asks the end-user if they completed an application. The second Radio Buttons component asks the end-user if the application was completed less than a month ago.

1. In the Module Builder, drag and drop two Radio Buttons icon Radio Buttons components onto your canvas.
2. In the Property ID and Label Text fields, enter the following:

Property ID

Label Text

fillOut

Did you fill out this application yourself?

startDate

Was this application started less than one month ago?

3. For each Radio Buttons component, complete the Values table as follows:

Option Label

Value to Store in the Submission Data

Yes

yes

No

no

4. Click Save Component for each Radio Buttons component as you complete it.

Configure the Initializer Component

The Initializer component, once triggered, pushes the value yes to each Radio Buttons component. The Initializer component triggers as soon as the module loads. This trigger action occurs based on the selection of the New Submission Trigger Type.

1. In the Module Builder, drag and drop an Radio Button component icon Initializer component onto your canvas, placing it above your Radio Buttons components.
2. In the Property ID  field, enter initNewSubmission.
3. In the Canvas Label Text field, enter Yes to All.
4. Set the Trigger Type as New Submission.
5. In the Outputs table, set the following: a
#

Source

Type

Value

1

fillOut

value

yes

2

startDate

value

yes

A static image displaying the Initalizer component Actions settings, the Trigger Type is set to New Submission and the Outputs table includes the fillOut and startDate Property IDs.

6. Click Save Component.
7.  Save  your module.

Once configured, click Preview to open your module in Express View. Here's how your module displays:

A static image displaying an Express View with two radio button components. The Initalizer component has automatically selected two of the radio buttons on submission load.

Resources