Save the date! Join us on October 16 for our Product Ops launch event. Register here.
Jul 15, 2020 02:14 PM
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?
Jul 16, 2020 10:42 AM
Thank you @kuovonne and @Justin_Barrett . Will review! responses much appreciated!
Jul 16, 2020 10:48 AM
Since you are already using Zapier, is there a particular reason you want to use scripting block instead of Zapier for this? You should be able to setup Zapier with a multi-step zaps where it looks for an existing record and creates one if it doesn’t exist yet.
It has to run so often I’m running out of zaps with all the extra steps. Plus I need to match Plates with previous Plate and Account data, and I can’t seem to make that happen.
Jul 16, 2020 11:15 AM
Thanks for the explanation. Yes, running out of Zaps could be an issue if you aren’t prepared to pay for more zaps.
Jul 16, 2020 11:18 AM
Hehe. I’m actually at one of the highest levels before going full enterprise at $600 a month!