Hi,
Is there any more documentation on the NewRecord type taken by the TableOperations create() method? I’m trying to add a new row from a button in a widget like this
let seenTable = grist.getTable("Seen");
seenTable.create([
{
"Asset": assetRowId,
"Date": new Date().toISOString()
}
]).then(function(record) {
console.log("Succeed");
console.log(record);
}, function(error) {
console.log("Failed");
console.log(error);
});
The call succeeds but it creates an empty row instead of populating it with the field values I supplied, I guessed at the syntax and it doesn’t seem to work. The Asset column is a reference to another table, the “Date” column is a standard date data column.
Thanks,
Mark Daniel