Hi,
I’m learning how to use the scripting block, not too successfully. I have tried to adapt the scripting block “select a record” and one from the thread about linked fields from @capt & @JonathanBowen but I can’t seem to get it to work. I am trying to copy the text output by a formula field (EQ3) into the text field Notes using a button.
Any help or advice would be much appreciated!
Many thanks,
Alastair
This is what I have so far:
// Name of table
let table = base.getTable("Requisitions");
// This script is run from a button field & will use the button's record
let record = await input.recordAsync('Select a record to use', table);
if (record) {
// You can use record.getCellValue("Field name") to access
let oldValue = record.getCellValue("EQ3");
let newValue = oldValue;
output.text(newValue);
table.updateRecordAsync(record,{"Notes": newValue});
} else {
output.text('No record was selected');
}