Add row to datatable
Function: Add row to datatable
This action allows you to add a brand new row of information to any Datatable component within your application. It's a powerful way to populate your tables with new records, such as new products, customers, tasks, or any other data your application manages. You provide a unique identifier for this new row and then specify the data you want to place into each column.
Input
- Datatable: The specific Datatable component in your application where you want to add the new row. This is the visual table element on your page. (Type: UI Element - Datatable)
- Row Code: A unique identifier for this new row. This is crucial for distinguishing this row from others. A good practice is to use an ID from an external system or a meaningful code that uniquely represents the data in this row. (Type: Text)
- Row Data: This is where you define the actual information for the new row. You'll specify which column each piece of data belongs to.
- Column Code: The unique code of the column in your Datatable where you want to place the data. This code identifies the specific column. (Type: Text)
- Data: The actual value you want to put into that specific column for the new row. (Type: Text)
Output
- Row ID: The unique identifier that was assigned to the newly added row. You can use this ID in subsequent actions if you need to refer to or manipulate this specific row. (Type: Text)
Execution Flow
Real-Life Examples
Example 1: Adding a New Product to a Catalog
You have a "Product Catalog" Datatable on your e-commerce administration page and you want to add a new product.
- Inputs:
- Datatable:
Product Catalog - Row Code:
PROD-005 - Row Data:
Column Code:ProductName,Data:Wireless HeadphonesColumn Code:Price,Data:99.99Column Code:Category,Data:Electronics
- Datatable:
- Result: A new row is added to the "Product Catalog" Datatable, displaying "Wireless Headphones" in the
ProductNamecolumn, "99.99" in thePricecolumn, and "Electronics" in theCategorycolumn. The action returnsPROD-005as the Row ID.
Example 2: Recording a New Customer Inquiry
A new customer fills out a contact form on your website, and you want to automatically add their inquiry to your "Customer Inquiries" Datatable.
- Inputs:
- Datatable:
Customer Inquiries - Row Code:
INQ-2023-0123 - Row Data:
Column Code:CustomerName,Data:Alice WonderlandColumn Code:Email,Data:alice@example.comColumn Code:Subject,Data:Product Feature RequestColumn Code:Status,Data:New
- Datatable:
- Result: A new inquiry record for "Alice Wonderland" is added to the "Customer Inquiries" Datatable, showing their email, subject, and a "New" status. The action returns
INQ-2023-0123as the Row ID.
Example 3: Adding a Task to a Project Plan
You are managing a project and want to add a new task to your "Project Tasks" Datatable on your project dashboard.
- Inputs:
- Datatable:
Project Tasks - Row Code:
TASK-DESIGN-UI - Row Data:
Column Code:TaskName,Data:Design User InterfaceColumn Code:AssignedTo,Data:BobColumn Code:DueDate,Data:2023-12-31Column Code:Priority,Data:High
- Datatable:
- Result: A new task named "Design User Interface" is added to the "Project Tasks" Datatable, assigned to "Bob" with a due date of "2023-12-31" and "High" priority. The action returns
TASK-DESIGN-UIas the Row ID.