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 MouseColumn code:price,Data:25.99Column code:stock_quantity,Data:150
- Datatable:
- Result: A new row is added to the
Products Inventory Tablewith the product "Wireless Mouse", priced at 25.99, and 150 units in stock. TheRow idoutput will bePROD-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.comColumn code:subject,Data:Issue with loginColumn code:status,Data:NewColumn code:date_received,Data:2023-10-26
- Datatable:
- Result: A new row is added to the
Customer Inquiriestable, detailing John Doe's login issue, marked as 'New', and received on October 26, 2023. TheRow idoutput will beINQ-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 MockupsColumn code:assigned_to,Data:SarahColumn code:due_date,Data:2023-11-10Column code:priority,Data:High
- Datatable:
- Result: A new row is added to the
Project X Taskstable, creating a task named "Review UI Mockups", assigned to Sarah, due by November 10, 2023, and marked as High priority. TheRow idoutput will beTASK-PX-007.