In Twidget, you can build custom reusable functions. These functions can be utilized across various sections including endpoints, events, and other functions. Instead of creating the same commands repeatedly, you can create a function once and reuse it wherever necessary, making your workflow more efficient and maintainable.
-
Functions in Twidget are structured similarly to endpoints. However, instead of using typical endpoint inputs such as query, headers, and body, functions use data type inputs.
Functions require specific data type inputs to operate. These inputs are defined in the inputs section of the function.
Each function also has an optional output. To simplify the use of functions, you can define an output schema. The output schema acts as an internal documentation detailing what the output of the function will look like. This makes it easier to understand and utilize the function correctly.
All custom functions you've created can be viewed in the Your Functions section of the Add Commands sidebar. This centralized view allows you to easily manage and access your reusable functions.
When you need to use a custom function that has inputs, you will be prompted to enter the required inputs in the Commands sidebar. This ensures that the function has all the necessary data to execute correctly.
Testing
In Twidget, you can easily test your endpoints and functions directly within our code builder. This guide will walk you through the steps to efficiently test your functions to ensure they meet your requirements. Running Tests. To start testing, follow these steps: 1. Open Code Builder: - Navigate to...
Command Output
Some commands in Twidget return outputs, which are essential for dynamic and conditional logic within your workflows. These outputs are displayed next to the command and are prefixed with an "as" to indicate the variable name. Using Output Variables. Once a command returns an output, you can use the...
Publishing Changes
With Twidget's publishing feature, you can seamlessly push your changes live, ensuring that your updates take effect on the specified endpoint, function, or event. This feature also allows for version control, enabling you to revert and manage different versions of your changes effectively. Steps to...
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...
Changes
In Twidget, every modification you make in our no-code builder is meticulously documented and stored as a change. Whether you are creating an input or editing a command, each action is captured in the platform. Important: Please note changes will not go live until they are published. Viewing Changes...