Load Row

The Load Row action allows you to load a row from a table by a given condition.

The action returns a single object:

{
  id: 1,
  name: "Bobbie Bogan II",
  first_name: "Bobbie"
}

Filtering

You can specify the filter condition to locate the row to load, for example:

// id = 23
{{ui.table.selectedRow.data.id}}

You can also specify multiple conditions - the row will be loaded if all conditions are met.

The condition(s) you specify will be sent to the server and converted to a SELECT statement, for example:

SELECT * FROM users WHERE id = 23 LIMIT 1;

In the action's Payload tab, you can check the actual condition sent to the server.

You can also use various condition operators to filter the table. For example, the like operator allows you to load rows with a partial match.

Data transformation

If the database returns its data in a different format than expected for the components, you can modify it. For example, you can turn on the Transform result toggle in the action's settings or add a JavaScript Code step to transform the data.

Then, you can map the object to a proper format:

return {
  ...{{data}},
  name: {{data}}.name.toUpperCase(),
};

Or add new properties:

return {
  ...{{data}},
  created_at: new Date(),
};action

Last updated

Was this helpful?