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.
-
To create a new variable in Twidget, you can use the Create Variable command. This will allow you to define a new variable with an initial value that you can later use and manipulate in your workflow.
Open the Twidget Platform:
Navigate to your Function, endpoint or event where you want to create the variable.
Select the Create Variable Command:
In your Add commands sidebar, find and select the Create Variable command.
Define the Variable Name:
Enter a unique name for your variable. This name will be used to reference the variable throughout your workflow.
Set the Initial Value:
Provide an initial value for your variable. This can be a number, text, boolean, or other types of data supported by Twidget.
Confirm and Create:
Confirm your settings and create the variable. The new variable will now be available for use in your builder.
After a variable has been created, you may need to update its value as your application runs. Twidget provides the Edit Existing Variable command to modify the value of an existing variable.
Navigate to the Workflow Editor:
Open the Add commands sidebar where your variable is located.
Select the Edit Existing Variable Command:
Choose the Edit Existing Variable command from the available options.
Choose the Variable to Edit:
Enter the variable you wish to edit
Update the Value:
Enter the new value you want to assign to the variable. This value can be dynamically calculated or statically defined based on your needs.
Apply Changes:
Confirm your changes. The variable's value will be updated and can be used in subsequent steps of your builder.
Naming Conventions: Use clear and descriptive names for your variables to make your workflows easier to understand.
Initial Value: Always set a relevant initial value for your variables to avoid unexpected behavior.
Type Consistency: Ensure that values assigned to a variable are of consistent types to prevent errors during execution.
Security
Twidget provides several built-in functions to enhance the security of your applications. Below is an overview of each security command, including its description, inputs, and outputs. Generate ID. Description: Generates a unique identifier. None - Type: Text Hash Text. Description: Hashes the provi...
Math
Twidget offers a variety of commands to manipulate numbers. Below are the math commands available, along with their descriptions, inputs, and outputs. Sum. Description: Adds together a list of numbers and returns the sum. - Inputs: - `numbers`: A list of numbers to be added together. - Output: A sin...
Lists
Twidget offers a variety of commands to help you manipulate lists easily without coding. Below is a detailed explanation of each command available. Get. Description: Returns the element in the provided list at the given index. Inputs: - `list`: The list from which to get the element. - `index`: The ...
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...
Send External HTTP Request
Using Twidget, you can send external HTTP requests effortlessly. This functionality allows you to communicate with external servers or APIs. Below, you will find the necessary parameters and structure to set up an HTTP request. Parameters. - URL: The endpoint to which the request will be sent. - Met...