Create New Record
This node creates a new entry in a database table.
The Create New Record node inserts data into a collection.
The Create New Record node allows you to add new rows to your database. It dynamically generates input ports based on the selected table's schema, making it easy to map form data to database columns.
General
| Data | Description |
|---|
| Class | The database collection (table) to insert into. |
| Source Object Id | Optional. If provided, the new record will start with data copied from this existing object. |
Properties
| Data | Description |
|---|
| * | Dynamic inputs for every writable column in the table (e.g., "Name", "Email"). Connect your data here. |
Access Control
| Data | Description |
|---|
| Access Control | "Public" (everyone can read/write), "Private" (only creator), or "Custom". |
Actions
| Signal | Description |
|---|
| Do | Triggers the creation (insert) operation. |
Outputs
General
| Data | Description |
|---|
| Id | The ID of the newly created record. |
Events
| Signal | Description |
|---|
| Success | Triggered when the record is successfully created in the database. |
| Failure | Triggered if the creation fails (e.g., validation error, network error). |
Error
| Data | Description |
|---|
| Error | Error message if the operation failed. |
Usage
Creating a User Profile
- Select Class: "Profiles".
- Connect Text Inputs to the "Name" and "Bio" input ports.
- Connect a "Submit" button to the Do signal.
- On Success, navigate to the new profile page using the output Id.
Detailed Behavior
- Validation: The node attempts to filter out invalid fields before sending data to the server to prevent errors.
- Defaults: If a field is not connected, it is not sent (allowing database defaults to take over).
- Security: Respects the Access Control setting. "Private" sets the ACL so only the current user can access the record.
Troubleshooting
- Failure: Check the Error output. Common issues include missing required fields or violating unique constraints.
- Extra Fields: If you see warnings about "problematic fields", the node is automatically cleaning up data that doesn't match the schema.