Help

Upcoming database upgrades. Airtable functionality will be reduced for ~15 minutes at 06:00 UTC on Feb. 4 / 10:00 pm PT on Feb. 3. Learn more here

Target an array into an array to push my data

160 0
cancel
Showing results for 
Search instead for 
Did you mean: 

Hi everybody I want to push some data into a field(array) and I don’t find any example or comment on how to do that in Airtable. For some context, I have a table with users and another table with events, every user has a unique ID, and when people fill the form to create an event, they have to enter their ID so the event is linked to the user in a lookup field that I added in the user table. I’m okay to take the ID from the event field and compare it to the ID in the user table. I’m just not able to push this same ID in the Lookup field to connect them at the end. In this case, the user Id is named Magical Number. My console.log at the end tells me I have the right value in my filterUsers variable, I have the right user that needs to b connected with the right event. How do I target the right field to push the ID into it, which is an array into an array cause I can have multiple events connected to the same user? Is there something in opposition to getCellValue like postCellValue? Here’s a loom video to explain a bit better: Loom | Free Screen & Video Recording Software

var eventsTable = base.getTable(“Events”);
var events = await eventsTable.selectRecordsAsync ();
var usersTable = base.getTable(“Users”);
var users = await usersTable.selectRecordsAsync ();
var magicalNumber = events.records[events.records.length - 1].getCellValue(‘Magical number’);

let filterUsers = users.records.filter((record)=> {

return record.getCellValue('Magical number') === (magicalNumber)

});
console.log(filterUsers)
filterUsers.push()…

0 Replies 0