May 22, 2024 12:35 PM - edited May 22, 2024 12:49 PM
I have a problem with a script that worked and all of a sudden, stopped to work:
"App Name" is a linked record field. "Add App On Sign Up" is another linked record field. When a value is inserted in "Add App On Sign Up", I need this value to be inserted in "App Name" (inserted, meaning adding a value, not replacing a value to "App Name".
Anyone has a better script to propose?
The error message is:
at main on line 12
Field "fldGBiazYCpFzbsOv" is the field id of App Name
const table = base.getTable("Members");
const query = await table.selectRecordsAsync();
for (const record of query.records) {
const appNames = record.getCellValue("App Name");
const addAppOnSignUp = record.getCellValue("Add App On Sign Up");
if (appNames && addAppOnSignUp) {
const updatedAppNames = appNames.map(appName => appName).concat(addAppOnSignUp);
await table.updateRecordAsync(record, {
"App Name": updatedAppNames
});
}
}
Solved! Go to Solution.
May 23, 2024 12:59 AM
I solved it by changing the script to perform an update in the Apps table and not directly in the Members table
May 23, 2024 12:59 AM
I solved it by changing the script to perform an update in the Apps table and not directly in the Members table