Non developer here. I think different flavors of what I’m trying to do have been asked in this forum, but nothing that’s quite a match. I’ve tried employing what I’ve found in the threads with some variations with no luck so far. What I’m trying to do is populate a blank column titled “Agency Talent” in my Agency table with linked records from my Talent Table. Eventually I want the field to be populated when there’s a match on two criteria (Agency match and skill category {e.g. IT, Operations, Engineering, etc.}), but I figured I would try to make it work on one critiera first to understand what scripting block was doing before adding the next layer of matching.
The Agency names are under a column titled “Owner” in that table and are under a column titled “Employer” in the talent table.
It seems that I’m not properly defining the "Name (Last,First)id; that is the name of the first column in the Talent table where I want to pull the linked record from. For some troubleshooting I’ve tried just substituting Employer.id since it is already called out, but all i get when running is an “error, something went wrong.”
Any ideas for where I’m going wrong?
let Agency = base.getTable("Agency");
let Talent = base.getTable("Talent");
let AgencyQuery = await Agency.selectRecordsAsync();
let TalentQuery = await Talent.selectRecordsAsync();
for (let Owner of AgencyQuery.records) {
for (let Employer of TalentQuery.records) {
let OwnerName = Owner.getCellValueAsString("Owner Name");
let EmployerName = Employer.getCellValueAsString("Employer Name");
if (OwnerName == EmployerName) {
await Agency.updateRecordAsync(Owner, {
"Agency Talent": >{id:
rName (Last,First).id}]