Ask AI
Skip to main content

Add row to datatable

Function: Add row to datatable

This action allows you to add a new row of information to an existing data table in your application. You can specify the unique identifier for the new row and provide the data for each column within that row. If a column you specify doesn't exist, the system will automatically create it for you.

Input

  • Datatable: The specific data table component in your application where you want to add the new row.
  • Code: A unique identifier for this new row. This is often an ID from your data source or a meaningful code that helps you identify the row later.
  • Row data: This is where you define the actual information for the new row. For each piece of data, you need to specify:
    • Column code: The unique code of the column where this data should be placed.
    • Data: The actual value you want to put into that column for the new row.

Output

  • Row id: The unique identifier that was assigned to the newly added row. This can be used in subsequent actions to reference this specific row.

Execution Flow

Real-Life Examples

Example 1: Adding a New Product to an Inventory Table

Imagine you have an inventory management application with a data table displaying all your products. You want to add a new product.

  • Inputs:
    • Datatable: Products Inventory Table
    • Code: PROD-005
    • Row data:
      • Column code: product_name, Data: Wireless Mouse
      • Column code: price, Data: 25.99
      • Column code: stock_quantity, Data: 150
  • Result: A new row is added to the Products Inventory Table with the product "Wireless Mouse", priced at 25.99, and 150 units in stock. The Row id output will be PROD-005.

Example 2: Recording a New Customer Inquiry

You have a CRM application with a data table to track customer inquiries. A new customer just submitted a question.

  • Inputs:
    • Datatable: Customer Inquiries
    • Code: INQ-2023-00123
    • Row data:
      • Column code: customer_email, Data: john.doe@example.com
      • Column code: subject, Data: Issue with login
      • Column code: status, Data: New
      • Column code: date_received, Data: 2023-10-26
  • Result: A new row is added to the Customer Inquiries table, detailing John Doe's login issue, marked as 'New', and received on October 26, 2023. The Row id output will be INQ-2023-00123.

Example 3: Updating a Project Task List with a New Task

In a project management tool, you have a data table listing all tasks for a specific project. A new task has been identified.

  • Inputs:
    • Datatable: Project X Tasks
    • Code: TASK-PX-007
    • Row data:
      • Column code: task_name, Data: Review UI Mockups
      • Column code: assigned_to, Data: Sarah
      • Column code: due_date, Data: 2023-11-10
      • Column code: priority, Data: High
  • Result: A new row is added to the Project X Tasks table, creating a task named "Review UI Mockups", assigned to Sarah, due by November 10, 2023, and marked as High priority. The Row id output will be TASK-PX-007.