Hi @pier24 - you need to use this pattern for input.recordAsync
:
let table = base.getTable("Tasks");
let record = await input.recordAsync('Pick a record', table);
if (record) {
output.text(`You picked ${record.getCellValueAsString("Description")}`);
}
So, modifying your script a little, this would be something like:
let table = base.getTable('Clients');
let record = await input.recordAsync('Pick a record', table);
if (record) {
await table.updateRecordAsync(record, {'Name': 'Updated'})
}
Although it looks like it is prompting you to select a record, if you attach this script to a button on a record, then this happens automatically in the background