Hello,
I have a company review database. On Table 1 is the Companies. Table 2 has the Reviews of those companies, with links to those individual entries. Each company has multiple reviews submitted by various people.
I have linked Companies to Reviews, done a lookup for the url + title I want (from Reviews). The script I have transforms those into hyperlinks successfully., but ONLY if there is only 1 url and 1 title in those fields.
Because each company has multiple reviews submitted by different people, each field has multiple entries (both url and title), and my script is resulting in one run-on link that shoved all the titles together. Any ideas how to edit this script to separate each of these out?
I used:
let tb2 = base.getTable("Companies");
let query2 = await tb2.selectRecordsAsync();
for (let record of query2.records) {
let url = record.getCellValue("Individual Rating links (from Reviews)");
let text = record.getCellValue("Job Title (from Reviews)");
if(url) {
tb2.updateRecordAsync(record, {"Rich Text Individual Ratings": `[${text}](${url})`})
}
}
Thanks in advance!