Initializer Component

Estimated Reading Time:  7 minutes

Overview

The Initializer component is one of Unqork's core logic components. Initializers trigger operations based on an end-user End-Users are the individuals accessing an application through Express View. In most cases, end-users are the customers using the product.'s interaction with components and modules. You can set up an Initializer component to watch for the click of a button. Or you can set up an Initializer component to trigger an operation with each new submission of a module. The Initializer component is a great way to add automation to your application.

Here are some real-world examples of when to use an Initializer component:

  • Auto-completing fields when an end-user opens a page or clicks a button.

  • Triggering a Plug-In component in a remote execute module.

  • Triggering the creation of a time-stamp on a 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 clip below is an example of using the Initializer component. On button-click, the Initializer component fires and values output into the Radio Buttons components.

You'll find the Initializer component in the Data & Event Processing group to the left of the Module Editor.

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

Once you drop a component onto the Module Editor canvas, the following settings windows display: 

General

A static image displaying the Initializer component configuration window.

Setting

Description

Property ID

A Property ID is the unique field ID used by Unqork to track and link components in your module.

The Property ID is how the software identifies your component. Using Property IDs lets you link components, creating logic-based configurations and API APIs (application programming interfaces) are a set of protocols and definitions developers use to build and integrate application software. APIs act as the connective tissue between products and services. calls.

Property IDs must use camel case A naming convention for computer programming. Use camelCase for Property IDs, for example: newUser, lastName, & rdoButton. (stylized as camelCase) without spaces or punctuation.

Notes

Select this tab to display the component's Notes area. You can use notes to keep your teammates informed.

The Notes editor offers a semi-WYSIWYG (What You See is What You Get) content editor. Built to look like a word processor, this editor lets you create, edit, and format your notes. Notes save when saving the component.

Display Icon Display

Select this tab to manage your component's display settings.

Actions Icon Actions

Select this tab to manage your component's actions settings.

Advanced Icon Advanced

Select this tab to manage your component's advanced settings.

Permissions Icon Permissions

Select this tab to see the RBAC RBAC (Role-Based Access Control) is a method to control system access for authorized users. The role in RBAC refers to the levels of access employees have to a network. (role-based access control) settings of the component.

Field Tag Icon Field Tags

Assign components one-word labels to help organize, identify, and group the components in your application.

Consider an example from the API Specification Snippet: Field Tags are applied to Hidden components in the panelRequest and panelResponse Panels. The Field Tags identify the data type of parameters included in the API APIs (application programming interfaces) are a set of protocols and definitions developers use to build and integrate application software. APIs act as the connective tissue between products and services. request and response. The API Docs Dashboard tool populates with information about each parameter’s data type, identified by the Field Tag.

Field Tags act as a type of Property ID A Property ID is the unique field ID used by Unqork to track and link components in your module. group and let you group components for configuration purposes. Field Tags let you target two or more components using a simple logic component.

For example, add the Field Tag tagForDecision to multiple components in your module. Open the Inputs table of a Decisions component and reference the tagForDecision Field Tag as the input of the Decisions component. The output of the Decisions component then affects all components with the tagForDecision Field Tag.

Save your Field Tags by pressing Enter (Return) or adding a comma after each entry.

Shortcuts Icon Shortcuts

Select this tab to open the list of supported keyboard shortcuts you can use in the component settings modal. Keyboard shortcuts include:

  • Cmd + S (Mac) / Ctrl + S (PC): Save and close the component settings modal.

  • Cmd + G (Mac) / Ctrl + G (PC): Opens a search window to find specific fields and settings in the component settings modal.

  • Tab: Tab to the next field or setting in the component settings modal. This keyboard shortcut tabs left to right and top to bottom.

  • Shift + Tab: Tab to the previous field or setting in the component settings modal. The keyboard shortcut tabs from right to left and bottom to top.

  • Enter (Return): When tabbing to a Tooltip Icon (tooltip), press Enter (Return) to display the field or setting tooltip. Press Enter (Return) again to hide the tooltip.

Additional keyboard shortcuts:

  • Drop-down menus: When you Tab to a settings drop-down, use the keyboard's Up-Arrow Icon (up)/ Down-Arrow icon (down) arrows to make a selection. Then, press Enter (Return) to confirm the selection.

Documentation IconDocumentation

Select this tab to access the component documentation in Unqork's In-Product Help.

Cancel

Click this button to undo any unsaved configuration changes and return to the canvas.

Save & Close

Click this button to save all settings as configured and return to the canvas.

Display Panel

A static image dispaying the Initializer component's Display settings.
(click to expand image)

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.

Actions Panel

A static image dispaying the Initializer component's Actions settings.
(click to expand image)

Triggers

Setting

Description

Trigger Type

A drop-down menu showing the following options:

  • Manual: The component fires when triggered by another component (for example, a Button or Plug-In component).
  • Watch: The component fires when there's any action taken on the input component(s) listed in the Inputs table. Actions include entering a new value or editing or overwriting a saved value. If there are multiple inputs, use the Required setting to specify what inputs must be present before firing.
  • New Submission: The component fires when the page or called module loads without an existing submission ID. Dashboards and remote execute modules are great uses for this trigger.
  • Edit Submission: The component fires when the page loads with a submission ID.
  • Browser Event: The component fires when the end-user closes or refreshes their page. When this happens, the end-user sees a pop-up. Try to keep your operations simple. Long API (application programming interface) calls, for example, might not complete before the page closes.

NOTE  When using New and Edit Submission Trigger Types in a workflow, submissions carry through the workflow. The New Submission Trigger Type only works for the first module of a workflow. For subsequent modules, use Edit Submission.

Inputs Table

The Inputs table is for inputting components that trigger the Initializer component.

Setting

Description

Property ID

The Property ID column is where you enter inputs that your logic component references. Examples of supported inputs include:

  • The Property ID of another component in the module. For example, a component that acts as a trigger, as an input for a Micro Decision, or referenced in a formula.

  • Values that aren't the Property ID of a component in the module, but are still present in the submission object. For example, the currentUser object contains information about the end-user.

    Native values generated by the Unqork Designer Platform. For example, buttonClick, which Unqork creates following button-click events.

Alias

To simplify the configuration, give each component an alias. An easy approach is to assign each component a different letter of the alphabet (for example: A, B, C).

Required

If selected, the end-user must enter a value in the field of this input component before the logic component fires.

Outputs Table

The Outputs table is for outputting components, and actions you want the Initializer component to perform.

Setting

Description

Property ID

For your logic component to recognize an output, you must enter the destination component's Property ID(s) here.

The Property ID entered must match the Property ID used in the output component. Remember, use camel case A naming convention for computer programming. Use camelCase for Property IDs, for example: newUser, lastName, & rdoButton. (stylized as camelCase) without spaces or punctuation.

Type

The following output types are available for your selection:

  • Clear: Clears any values in the Output component. Enter yes in the Value column.

  • Trigger: Triggers components, such as Plug-Ins and Decisions. Enter GO in the Value column to trigger the selected component.

  • Editable: This setting is similar to Disabled, but is specific to Grid components.

  • Hidden: Sets a front-end component visible or hidden, with possible values of yes or no.

  • Clear: Clears any values in the Output component. Enter yes in the Value column.

  • ComponentReferenceKey: Lets you update any settings on an Advanced Datagrid component.

  • Content: Sets the value inside an HTML Element and Content component.

  • Currency: Sets the currency when the output is a Number component.

  • CustomClass: Changes the CSS class of an element. Enter the desired CSS class in the Value column.

  • Disabled: Sets the component as disabled and read-only. Or it activates a disabled and read-only component. Enter either yes (disabled and read-only) or no (active) in the Value column.

  • Duration: Sets the duration for a Timer component.

  • DynamicRefresh: Triggers the specified panel to refresh its existing content with the provided component definitions (component JSON). The specified Panel component must have Dynamic Refresh enabled.

  • Editable: This setting is similar to Disabled but is specific to Grid components.

  • Hidden: Sets a front-end component either visible or hidden, with possible values of yes or no.

  • Label: Changes the label on a field. For example, the same question can be worded differently depending on the state your end-user is in. Use this feature to alter the phrasing depending on their state selection.

  • Maximum: Sets the highest value your end-user can enter into a field. If your end-user enters an amount that exceeds the maximum value, an error displays.

  • Message: An error message displays under the output field. For example, let's say an applicant must be 18 years or older for their application to be successful. Using an age-related error message, you can set the message to say, "Must be 18 years or older to apply."

  • Minimum: Sets the highest value your end-user can enter into a field. If your end-user enters an amount that's lower than the minimum value, an error displays.

  • Multi: The most powerful output value. Use this for asynchronous data configuration decisions.

  • Navigation: Configures a navigation move for a Navigation component.

  • Page: The selected URL opens and displays in the same tab. The page uses an HREF to a URL in the same tab.

  • PageOpen: The selected URL opens and displays in a new tab. The page uses an HREF with Target=blank.

  • Pattern: Defines the component's regular expression. This setting is useful for text fields.

  • PopError: Creates a pop-up error message. Enter the content of your message in the Value column.

  • PopMessage: Creates a pop-up containing a message. Enter the content of your message in the Value column.

  • Prefix/Suffix: Applies a prefix to the output component. Enter the prefix in the Value column.

  • ReadOnlyView: Sets a component as read-only, or sets a read-only component as read/write. Enter either yes (read-only) or no (active) in the Value column.

  • Required: Sets the output component as required or not required. Enter either yes (required) or no (not required) in the Value column.

  • RequiredAndVisible: Combines the Required and Visible operations, setting both at the same time. Enter either yes (required and visible) or no (not required and hidden) in the Value column.

  • Reset: Resets the component to default settings (before end-user interaction). Enter yes in the Value column.

  • SelectValues: Defines options available in a Dropdown and Multi-Select Dropdown component. This is similar to how to use the componentReferenceKey Trigger Type.

  • Steps: This setting is specific to the Number component and lets you set up steppers and a number range.

  • Suffix: Applies a suffix to the output component. Enter the suffix in the Value column.

  • Title: Changes the title of a Panel.

  • Trigger: Triggers components, such as Plug-Ins and Decisions. Enter GO in the Value column to trigger the selected component.

  • Validate: Tells the output component to validate the data entered into it.

  • Value: Takes the value entered in the Value column and pushes it to the output component.

  • Visible: Sets the component as visible or hidden in Express View.

NOTE  The following output Types are not supported or referenced above: Steps, Focus, Pattern, Content, SelectValues, Editable, Hidden, and Clicked.

Value

Supporting text or values that work in conjunction with the Output Type selected. If the Type requires custom text (PopMessage or PopError, for example), enter the text here. Otherwise, if the Type needs a yes, no, or GO Value (for example, Required or Trigger), enter that here.

Advanced Panel

A static image dispaying the Initializer component's Advanced settings.
(click to expand image)

Set Execution

Setting Description

Disable Execution

If Disable Execution is set to Toggle Button set to On (ON), the logic tied to this component does not execute. Use this to keep the component's settings, but to disable the operations it performs.

By default, Disable Execution is set to Toggle Button set to Off. (OFF).

Set Debounce

The number of milliseconds that pass before the module loads this component. This is useful if you have a large module and you load several components at the same time.

NOTE  1,000 milliseconds = 1 second.

NOTE  For an Initializer component, this is how much time passes before triggering.

Adding an Initializer Component

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 will watch for new submissions. With each new submission, your Initializer fires the value yes to a series of Radio Buttons.

NOTE  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 to 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 Editor, drag and drop two Radio Buttons icon Radio Buttons components onto your canvas.
2. In the Property ID A Property ID is the unique field ID used by Unqork to track and link components in your module. and Label Text Label Text conveys what the input component is and what information it displays. Enter the purpose of the corresponding component or field. 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. Save & Close 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 Editor, drag and drop an Radio Button component icon Initializer component onto your canvas, placing it above your Radio Buttons icon Radio Buttons components.
2. In the Property ID A Property ID is the unique field ID used by Unqork to track and link components in your module.  field, enter initNewSubmission.
3. In the 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. field, enter Yes to All.
4. Set the Trigger Type Deteremines how the component triggers. as New Submission The component fires when the page or called module loads without an existing submission ID. Dashboards and remote execute modules are great uses for this trigger..
5. In the Outputs Enter outputs components and actions you want the component to perform. table, set the following:
 

Property ID

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 & Close.
7. Save your module.

Once configured, click Preview to open your module in Express View Express View is how your end-user views you application. Express View also lets you preview your applications to test your configuration and view the styling. After configuring a module, click Preview in the Module Editor to interact with the 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