Ask AI
Skip to main content

Store list in scope

Function: Store list in scope

This action allows you to take a collection of items (a list) and save it into your application's memory, making it available for use in other parts of your application. Think of it like putting a labeled box of items into a storage room – you can then retrieve that box by its label whenever you need it.

Input,

  • List (ARRAY of VARIABLEs): This is the collection of items you want to store. It can be a list of text, numbers, dates, or any other type of data your application handles. If you don't provide a list, an empty list will be stored.

Output,

  • Result (ARRAY of VARIABLEs): This is the name you give to the new variable where your list will be stored. After this action runs, you can use this name to access the list throughout your application. This name is required.

Execution Flow,

Real-Life Examples,

  1. Example: Storing a list of product categories

    • Inputs:
      • List: ["Electronics", "Clothing", "Home Goods", "Books"]
      • Result: ProductCategories
    • Result: A new variable named ProductCategories is created in your application's memory, containing the list of product categories. You can now use ProductCategories in dropdowns or filters on your pages.
  2. Example: Storing a list of user IDs from a database query

    • Inputs:
      • List: [101, 105, 112, 120] (This list might come from a "Get Users" action)
      • Result: ActiveUserIDs
    • Result: A variable named ActiveUserIDs is now available, holding the list of user IDs. You could then use this list to send notifications to these specific users.
  3. Example: Initializing an empty shopping cart

    • Inputs:
      • List: (Left empty, meaning an empty list)
      • Result: ShoppingCartItems
    • Result: An empty list is stored under the variable name ShoppingCartItems. This variable can then be used to add items as a user browses your online store.