Variables

Overview

In noKodr, variables are data placeholders that can be used to store and manipulate values within the application such as interaction between different components, layouts, workflows and events. Variables can be used to pass the data between different parts of the application and control logic in workflows.

variables.png
Variables

Note: You may encounter pre created variables within the system. These prebuilt variables are locked, meaning they cannot be modified or deleted. They are provided as reference points to assist you in creating new variables.

Key Uses of Variables:

  • Data Storage: Store values such as user inputs, calculations, or data retrieved from external sources.

  • Dynamic Content: Use variables to dynamically update content on the layout based on user interactions or other event triggers.

  • Workflow Control: Control the flow of processes in workflows by using variables to make decisions, trigger actions, or modify data.

  • Component Interaction: Pass data between components, allowing them to interact and respond to changes in real time.

Variable Config:

image-20240816-095124.png
Variable Config

Field Name

Description

Field Name

Description

Label

A name for the variable, used for easy identification within the application.

Name

The unique identifier for the variable, typically used in code or within merge text.

Field Type

Defines the type of data the variable will store (e.g., text, number, date, etc.).

Reference: Field Types

Default Value

It is the value assigned to the variable, and it is applied if no other value is provided.

Is Array

It is the checkbox that indicates whether the variable can store multiple values (an array) instead of just one value.

Variable Scope

The Variable Scope defines the accessibility of the variable, with the following options:

In: The variable is used to receive input from another layout.

Out: The variable is used to pass data from the current layout to another layout.

In/Out: The variable is used for passing data both input and output from a layout, enabling bidirectional data flow.

Field Types:

Data Type

Description

Data Type

Description

Text

Stores a string of characters, such as names or descriptions.

Checkbox

Represents a boolean value (true/false) typically used for yes/no selections.

Integer

Holds whole numbers without decimals, used for counting or numerical calculations.

Double

Stores numbers with decimals, allowing for more precise calculations.

Record

Represents a single Salesforce record, such as an account or contact.

Object

Used to store complex data structures that can contain multiple properties and values.

Currency

Used to represent monetary values, ensuring proper formatting and calculations.

Date

Stores a calendar date (year, month, day) without time information.

DateTime

Stores both date and time information together.

Picklist

A dropdown menu that allows users to select a single value from a predefined list.

Tags

Stores a list of keywords or labels used for categorization or filtering.

Email

Specifically formatted to store email addresses.

Phone

Holds phone numbers, often with specific formatting.

URL

Stores web addresses (Uniform Resource Locators) for linking to external resources.

Radio

Represents a group of options, where only one can be selected.

Time

Stores time information without an associated date.

Percentage

Stores numerical values represented as percentages, often used in calculations or metrics.

Text Area

Allows for the input of larger amounts of text.

Duration

Stores a length of time, typically used for measuring intervals or time spans of times.

Multi Picklist

Allows users to select multiple values at same time from a predefined list.

For example,

Calculating and Displaying Order Totals

You might define variables like Item Price, Quantity, and Discount. As users input the quantity of items they want to purchase and apply a discount code, the variables update instantly. The total cost, stored in a variable named Total Amount, is then displayed on the page, reflecting the latest calculations.

This use case demonstrates how variables can be employed to perform real-time calculations and display updated results.