I have a script that’s currently working to create one record on my Project/Yarn junction table, but I need it to create multiple records, one per linked cell value in Yarn (from stash), if there are multiple of these. I’ve had a looked on the forums but am struggling to find the solution, can anyone help? This is my current script:
let table = base.getTable(“Projects”);
let record = await input.recordAsync(‘Select a record to use’, table);
let populateTable = base.getTable(‘Project/Yarn’);
if (record) {
await populateTable.createRecordAsync({
“Project”: r{id: record.id}],
“Yarn used”: record.getCellValue(‘Yarn (from stash)’),
})
output.text(Record created: ${record.name}
)
} else {
output.text(‘No record was selected’);
}