The Condition Command allows you to perform actions based on whether an expression evaluates to true or false. You can nest other commands within the true or false branches of the condition, enabling complex logic flows.
-
Expression Builder: Validate two variables to equal true. Multiple expressions can be added; all expressions must be true for the condition to pass.
Nested Commands: Commands can be nested within the true and false branches.
Else If and Else Blocks: Support for multiple else if
statements and a single else
block, each containing its own nested commands.
The Switch Command allows you to validate a single variable against multiple case values. Each case can contain nested commands that will execute if the case value matches the variable. Additionally, a default block can be provided to handle cases where none of the specified cases are true.
-
Case Validation: Compare a variable against multiple case values.
Nested Commands in Cases: Each case block can contain commands that will execute if the case value matches the variable.
Default Block: When no cases match, the flow will enter the default block containing its nested commands.
The Validate Command ensures that specific expressions evaluate to true. If any of the expressions are false, the validate command will throw an error. You can specify custom error messages and server errors, including common HTTP status codes such as Bad Request, Unauthorized, etc.
-
Expression Validation: Validate multiple expressions.
Error Handling: Throw an error if any expression fails.
Custom Error Messages: Specify custom error messages and server error codes.
These commands enhance your ability to build complex, condition-based logic flows without having to write code. Utilize the Condition, Switch, and Validate commands to control the workflow dynamically based on variable values and expressions.
Date
Twidget offers a variety of commands to manipulate date objects. Below are the available commands along with their respective descriptions, inputs, and outputs. Current Date. Description: Returns the current date and time. Output: - Type: DATE Add Time. Description: Returns the date plus a specified...
Loops
In Twidget, loops allow you to execute commands multiple times, either based on a condition or through a set number of iterations. Loops can also be nested, meaning you can run loops within other loops, creating complex logic for your tasks. List Loop. The `List Loop` command enables you to loop thr...
Variables
Variables are essential building blocks in Twidget that allow you to store and manipulate data dynamically within your no-code applications. They enable you to create flexible and interactive applications by holding values that can be changed and referenced throughout your workflow. Creating Variabl...
Conversion
Overview. Twidget's conversion commands allow you to easily convert different data types to the required format. Below is a list of the available conversion commands and examples of how to use them. The `Convert to Text` command converts the provided value to a text (string) format. Examples: - `123...
Local Storage
Twidget provides a set of local storage commands that enable interaction with the browser’s `localStorage` API through a no-code interface. These commands are useful for storing, retrieving, and managing key-value data persistently within the current domain context. Purpose. These commands abstract ...