Hi @Viken_Toramanian - you can just use my_record[0].id
to use the unique user id within Airtable. Here’s my script to log them all out (for all records):
let table = base.getTable('Table');
let query = await table.selectRecordsAsync();
for (let record of query.records){
let collaborators = record.getCellValue('Collaborators');
if (collaborators) {
for (let collaborator of collaborators) {
console.log(collaborator.id)
}
}
}
If this answers your question please consider marking this as the "solution". If not, please post again for more help. Thanks!
Hi @Viken_Toramanian - you can just use my_record[0].id
to use the unique user id within Airtable. Here’s my script to log them all out (for all records):
let table = base.getTable('Table');
let query = await table.selectRecordsAsync();
for (let record of query.records){
let collaborators = record.getCellValue('Collaborators');
if (collaborators) {
for (let collaborator of collaborators) {
console.log(collaborator.id)
}
}
}
If this answers your question please consider marking this as the "solution". If not, please post again for more help. Thanks!Hi @JonathanBowen,
It works perfectly ! Thank you :thumbs_up:
I just adapt it and use selectRecords() instead of selectRecordsAsync(), because I have a function which is checking if my user is part of field “collaborator”. If I use selectRecordsAsync() the function will not check on time the condition and it will not considere if the user is part or not part of the field “collaborator”.
Thank you again for your help.