Hello. I’m learning the scripting block and not a programmer but hope to get my feet wet.
I have taken the basic script to “select a record” and added that to a button called COPY.
// Change this name to use a different table
let table = base.getTable("Table 3");
// Prompt the user to pick a record
// If this script is run from a button field, this will use the button's record instead.
let record = await input.recordAsync('Select a record to use', table);
if (record) {
// Customize this section to handle the selected record
// You can use record.getCellValue("Field name") to access
// cell values from the record
output.text(`You selected this record: ${record.name}`);
} else {
output.text('No record was selected');
}
But now I want to use the record selected to copy Field 1 (which is a lookup field) into Field 2 which is just a basic number field.
Can anyone point me how to “copy” data from one field to the other?


