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.
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 ...
Managing Files
Twidget offers a set of commands to manipulate files in your file store. Below are the descriptions and usage of each command to help you understand how to utilize them effectively. Get File. Retrieve a file via file path. Inputs: - `path`: The file path to retrieve the file from. Outputs: - `filena...
Error Handling
When building applications with Twidget, you may encounter situations where you need to handle errors gracefully to ensure your application runs smoothly. Twidget provides two powerful commands for error handling: `try-catch` and `throw-error`. This documentation will guide you on how to use these c...
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...
Text
Twidget offers a variety of commands to manipulate text in various ways. To Uppercase. Converts all characters of the provided text to uppercase. - text: The text to be converted to uppercase. - A text string with all characters in uppercase. To Lowercase. Converts all characters of the provided tex...