Ask AI
Skip to main content

Create an empty list

Function: Create an empty list

This action allows you to create a new, empty list in your application's memory. This is useful when you need to start collecting items from scratch, such as a list of selected products, pending tasks, or filtered data, before adding any actual items to it.

Input

  • Variable Name for List
    • Type: STRING
    • Description: This is the name you want to give to your new empty list. You will use this name to refer to the list later in your application when you want to add items to it or retrieve its contents.
    • Default Value: CREATED_LIST

Output

  • An empty list will be created and stored in your application's memory under the variable name you provided.

Execution Flow

Real-Life Examples

Here are some examples of how you can use the "Create an empty list" action in your no-code application:

Example 1: Initializing a Shopping Cart

Imagine you're building an e-commerce application. When a customer starts a new shopping session, you need an empty list to hold the items they add to their cart.

  • Inputs:
    • Variable Name for List: ShoppingCartItems
  • Result: An empty list named ShoppingCartItems is created. You can then add products to this list as the customer browses your store.

Example 2: Preparing a List of Filtered Records

Suppose you have a database of customer orders and you want to create a list of only the "pending" orders. You'd start with an empty list and then add matching orders to it.

  • Inputs:
    • Variable Name for List: PendingOrders
  • Result: An empty list named PendingOrders is created. You can then use other actions to search your customer orders and add any pending ones to this list.

Example 3: Collecting User Selections from a Form

You have a form where users can select multiple options from a checklist. Before processing their selections, you need an empty list to store their choices.

  • Inputs:
    • Variable Name for List: SelectedOptions
  • Result: An empty list named SelectedOptions is created. As the user checks boxes on your form, you can add their selections to this list.