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_UUIDas the variable name.- Default Value:
CREATED_UUID
- Default Value:
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
-
Creating a unique order ID for an e-commerce application:
- Inputs:
- Result:
OrderID
- Result:
- Result: A new variable named
OrderIDis created, containing a unique identifier likef8e7d6c5-b4a3-2109-8765-43210fedcba9. ThisOrderIDcan then be used to uniquely identify a new customer order in your database.
- Inputs:
-
Generating a session token for a user after login:
- Inputs:
- Result:
UserSessionToken
- Result:
- Result: A new variable named
UserSessionTokenis created, holding a unique string such as1a2b3c4d-5e6f-7890-abcd-ef1234567890. This token can be assigned to a user when they log in to track their active session.
- Inputs:
-
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_UUIDis created, containing a unique identifier like98765432-10fe-dcba-9876-543210fedcba. This unique ID can be assigned to a new product entry in your inventory system.
- Inputs: