Sign Up

Commands in Twidget

Commands are the building blocks of Twidget's no-code platform. They function like code statements and can perform various operations such as creating and updating variables, loops, conditionals, retrieving and manipulating data in the datastore, and much more.

-

Creating a Command

  1. Navigate to the Commands section of your builder.

  2. Click on Add Command. This will open a sidebar.

  3. In the sidebar, you can:

    • Select the command you want to add.

    • Use the search bar to find a specific command.

    • Access your custom functions as commands.

Inputs and Outputs

When you add a command, some commands will require inputs, while others provide outputs that you can use in other commands.

  • To see a comprehensive list of built-in commands and their details, click here.

Managing Commands

Viewing Commands

You can view all your commands and preview their inputs and output variable

Adding Descriptions

For better understanding and managing your business logic, you can add custom descriptions to commands.

Editing Commands

To edit any existing command:

  1. Click on the command you want to edit.

  2. Change its inputs/outputs as needed.

  3. Save your changes.

Deleting Commands

You can delete a command by selecting it and choosing the delete option.

Nested Commands

Some commands allow you to add child commands, for example:

  • Loops: Iterate over a set of items and execute commands for each item.

  • Conditionals: Execute commands based on specified conditions.

Special Commands

  • Return Commands: These commands will halt the execution of the current function, event, or endpoint.

By leveraging these commands, you can create complex workflows and business logic without writing a single line of code.

Related Topics

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...

Global Variables

Global variables in Twidget are key-value pairs that can be used anywhere across events, endpoints, and functions. They provide a powerful way to manage and share data throughout your projects. Key Features. - Data Types: Global variables support text, number, boolean, and date data types. - Securit...

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...

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...