Add a new row to table

Hello, does anybody know how to insert a new row into my table??

My table is named table4 and it is using this query;

SELECT
  *
FROM
  earnedmile 
WHERE
userid = {{table2.selectedRowKey}}

I attempted to use the query, and although it successfully inserts a row into the table, I find myself having to revisit the query later on to update the values for a new entry. Ideally, these values should be sourced from the data itself, with the only manual input being for the "miles" value.

INSERT INTO
  earnedmile (miles, transactionDate, transactionValue, id, updatedAt)
VALUES
  (50, '2023-10-18', 0, 'id', '2023-10-18');
1 Like
INSERT INTO
  earnedmile (miles, transactionDate, transactionValue, id, updatedAt)
VALUES
  ({{table4.selectRow.miles}},{{table4.selectRow.date}}, {{table4.transactionValue}},  {{table4.id}},  {{table4.updatedAt}});
1 Like

Hi @skroyer As Scott shows you can add dynamic values to reference anything from your app by wrapping it in {{}}. Let us know if you run into any trouble!