Create data-format in scope
Function: Create data-format in scope
This action allows you to define and store a new data structure (like a template for a database table or a complex object) within your application's memory, making it accessible for other actions to use. Think of it as creating a blueprint for data that you can refer to by a specific name throughout your application's logic.
Input
- Variable Name (NAME)
- Type:
STRING(A piece of text) - Description: This is the unique name you want to give to your new data-format variable. You will use this name to retrieve or reference this data structure later in your application. It's like giving a label to your blueprint.
- Type:
- Value (VALUE)
- Type:
DATA_FORMAT(A database table or data transfer object) - Description: This is the actual data structure or object definition you want to store. It could be a schema for a new table, a complex JSON object structure, or any other structured data blueprint.
- Type:
Output
- Variable Name (NAME)
- Type:
STRING(A piece of text) - Description: The name (text) that was successfully assigned to the new data-format variable. This confirms the identifier you provided for your data structure.
- Type:
Execution Flow
Real-Life Examples
Here are some examples of how you might use the "Create data-format in scope" action:
-
Defining a User Profile Structure:
- Inputs:
- Variable Name:
UserProfileSchema - Value: ```json
{
"firstName": "STRING",
"lastName": "STRING",
"email": "EMAIL",
"age": "NUMBER"
}
- Variable Name:
- Result: A new data-format variable named
UserProfileSchemais created in your application's memory, defining the structure for user profiles. Other actions can now useUserProfileSchemato create, validate, or display user data.
- Inputs:
-
Setting up a Product Catalog Item:
- Inputs:
- Variable Name:
ProductItemTemplate - Value: ```json
{
"productId": "STRING",
"productName": "STRING",
"price": "CURRENCY",
"inStock": "BOOLEAN",
"description": "STRING"
}
- Variable Name:
- Result: The application now has a
ProductItemTemplatedata-format available, which can be used as a blueprint for adding new products to a catalog or displaying product details consistently.
- Inputs:
-
Creating a Custom Report Layout:
- Inputs:
- Variable Name:
SalesSummaryReport - Value: ```json
{
"reportTitle": "STRING",
"dateRange": "DATE",
"totalSales": "CURRENCY",
"topSellingProduct": "STRING",
"salesByRegion": {
"north": "CURRENCY",
"south": "CURRENCY",
"east": "CURRENCY",
"west": "CURRENCY"
}
}
- Variable Name:
- Result: A data-format named
SalesSummaryReportis stored, providing a standardized structure for generating and displaying sales summary reports within your application.
- Inputs: