I have a fetch that calls an API and adds all of the records to my table (Title, Date, Unique ID). That is good.
Now when I make another call to the API I want to run thought the existing field, match the Unique ID and update the name and date (does not matter if they are different) and if there is no record with that Unique ID add the Title, Date and Unique ID to the end of the records.
let response = await remoteFetchAsync("URL", requestOptions);
let json = await response.json();
let table = base.getTable("Table");
let titleColumn = table.getField("Title")
for (i=0; i < json.length; i++) {
if(json[0].Title !== titleColumn){
let recordId = await table.createRecordAsync({
"Title": json[i].Title,
"Date": json[i].Date,
"Unique ID": json[i].uniqueID
})
}
};
Thanks!
