Create an empty list
Function: Create an empty list
This action helps you create a brand new, empty list in your application. You can then add items to this list later using other actions. It's like getting an empty box ready to store things, which is very useful when you need to collect multiple pieces of information.
Input
There are no explicit input parameters for this action. You define the name of the output list directly.
Output
- Result
- Description: This is the name you choose for the new empty list. The platform will create an empty list and store it under this name, making it available for use in subsequent actions.
- Type: List (Array) of any type (Variable)
- Default Value:
CREATED_LIST(If you don't provide a name, the list will be calledCREATED_LIST). - Required: Yes, you must specify a name for the list.
Execution Flow
Real-Life Examples
Here are some real-life scenarios where you might use the "Create an empty list" action:
Example 1: Preparing a list for new customer orders
Imagine you're building an order management system. At the beginning of processing a new order, you might want to create an empty list to hold all the individual items the customer wants to buy.
- Inputs:
- Result:
CustomerOrderItems
- Result:
- Result: An empty list named
CustomerOrderItemsis created. You can now add product details to this list as the customer selects them.
Example 2: Collecting user selections from a form
Suppose you have a form where users can select multiple options, like their preferred features for a product. Before the user starts selecting, you can create an empty list to store their choices.
- Inputs:
- Result:
SelectedFeatures
- Result:
- Result: An empty list named
SelectedFeaturesis created. As the user checks boxes, their selections can be added to this list.
Example 3: Staging data for a report
You are generating a daily sales report and need to collect sales data from various sources before compiling it. You can start by creating an empty list to temporarily hold all the raw sales records.
- Inputs:
- Result:
DailySalesRecords
- Result:
- Result: An empty list named
DailySalesRecordsis created. You can then populate this list with sales data from different databases or APIs.