Appearance
Update Row
The Update Row node modifies existing rows in a WP-Nexus database table, custom post type, or taxonomy. The input must include the row's ID to identify which record to update.
Configuration
| Property | Type | Default | Description |
|---|---|---|---|
tableId | number | -- | Required. The ID of the WP-Nexus table to update. |
Input
Accepts a single object or an array of rows. Each row must include the appropriate ID field:
- Custom tables:
id - Custom post types:
ID - Taxonomies:
term_id
Output
Returns the input rows unchanged. On error, an _error field is added.
How It Works
Custom Table
- Extracts the
idfrom the row. - Removes
idfrom the update data. - Calls
$wpdb->update()with the remaining fields.
Custom Post Type
- Extracts
IDfrom the row. - Updates core fields (
post_title,post_content,post_status) viawp_update_post(). - Updates custom meta fields via
update_post_meta().
Taxonomy
- Extracts
term_idfrom the row. - Updates core fields (
name,slug,description) viawp_update_term(). - Updates custom meta fields via
update_term_meta().
Example Use Cases
Edit form submission
Context --> Validate --> Sanitize --> Update Row (tableId: 3) --> OutputThe form must include a hidden field or context value with the row id.
Toggle a status field
Context --> Set Field (status = 'completed') --> Update Row (tableId: 5) --> OutputMark a todo as complete
Context --> Set Field (completed = '1') --> Set Field (completed_at = now()) --> Update Row --> OutputWARNING
The input must include the row's ID field. If the ID is missing, the node returns an _error without modifying any data.
TIP
Only the fields present in the input are updated. Omitted fields remain unchanged in the database.