Ask AI
Skip to main content

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.
  • 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.

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.

Execution Flow

Real-Life Examples

Here are some examples of how you might use the "Create data-format in scope" action:

  1. Defining a User Profile Structure:

    • Inputs:
      • Variable Name: UserProfileSchema
      • Value: ```json { "firstName": "STRING", "lastName": "STRING", "email": "EMAIL", "age": "NUMBER" }
    • Result: A new data-format variable named UserProfileSchema is created in your application's memory, defining the structure for user profiles. Other actions can now use UserProfileSchema to create, validate, or display user data.
  2. Setting up a Product Catalog Item:

    • Inputs:
      • Variable Name: ProductItemTemplate
      • Value: ```json { "productId": "STRING", "productName": "STRING", "price": "CURRENCY", "inStock": "BOOLEAN", "description": "STRING" }
    • Result: The application now has a ProductItemTemplate data-format available, which can be used as a blueprint for adding new products to a catalog or displaying product details consistently.
  3. 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" } }
    • Result: A data-format named SalesSummaryReport is stored, providing a standardized structure for generating and displaying sales summary reports within your application.