Ask AI
Skip to main content

Create a unique identifier in scope

Function: Create a unique identifier in scope

This function generates a completely unique text string, often called a UUID (Universally Unique Identifier) or GUID (Globally Unique Identifier), and stores it in a new variable within your application's memory. This is incredibly useful when you need to create unique IDs for records, sessions, or other data without worrying about duplicates.

Input

  • Result (Text): This is the name you want to give to the new variable that will hold the unique identifier. If you don't provide a name, the system will automatically use CREATED_UUID as the variable name.
    • Default Value: CREATED_UUID

Output

A new variable is created in your application's memory (scope) with the name you specified (or CREATED_UUID by default). This variable will contain a unique text string, for example: a1b2c3d4-e5f6-7890-1234-567890abcdef.

Execution Flow

Real-Life Examples

  1. Creating a unique order ID for an e-commerce application:

    • Inputs:
      • Result: OrderID
    • Result: A new variable named OrderID is created, containing a unique identifier like f8e7d6c5-b4a3-2109-8765-43210fedcba9. This OrderID can then be used to uniquely identify a new customer order in your database.
  2. Generating a session token for a user after login:

    • Inputs:
      • Result: UserSessionToken
    • Result: A new variable named UserSessionToken is created, holding a unique string such as 1a2b3c4d-5e6f-7890-abcd-ef1234567890. This token can be assigned to a user when they log in to track their active session.
  3. Assigning a unique ID to a new product being added to inventory:

    • Inputs:
      • (Leave Result blank, using the default name)
    • Result: A new variable named CREATED_UUID is created, containing a unique identifier like 98765432-10fe-dcba-9876-543210fedcba. This unique ID can be assigned to a new product entry in your inventory system.