Twidget supports six main data types to facilitate interactions within the platform. These data types are essential for defining inputs, outputs, and table fields, helping users understand the nature of the data being handled. The available data types in Twidget are as follows:
Description: Represents any string of characters.
Usage: Used for fields or inputs that require text, such as names, descriptions, emails, etc.
Example: "Hello, World!"
Description: Represents both integer and floating-point numbers.
Usage: Used for fields or inputs that require numerical values, such as age, price, score, etc.
Example: 42
, 3.14
Description: Represents a binary value (true or false).
Usage: Used for fields or inputs that require a true/false value, such as yes/no questions, toggles, etc.
Example: true
, false
Description: Represents dates and times.
Usage: Used for fields or inputs that require date and/or time values, such as birthdates, appointment times, etc.
Example: "2023-10-05T14:48:00.000Z"
Description: Represents a collection of key-value pairs.
Usage: Used for fields or inputs that require structured data, such as JSON objects.
Example: { "name": "John Doe", "age": 30 }
Description: Represents file data.
Usage: Used for fields or inputs that require file uploads, such as documents, images, etc.
Example: {"filename": "document.pdf", "size": 1024}
Data types in Twidget are used to:
Define Inputs: Specify what type of data can be entered into form fields.
Specify Outputs: Indicate what type of data will be generated or returned by a function or process.
Create Table Fields: Determine the types of data that can be stored in each column of a table, ensuring data integrity and appropriate handling.
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...
Inputs
Overview. In Twidget, inputs are essential elements that allow you to configure endpoints and functions. Events do not use inputs. Endpoint Inputs. Endpoint inputs are used to retrieve data from requests. The available types of endpoint inputs are: 1. Path: Variables that are part of the URL path. 2...
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...
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...
Functions
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 e...