Hi! I saw an article that discuss my problem, but didn’t have the solution. I’m trying to create an automatization that runs a script to copy a field (formula that puts year and month together like this 2021-12) to a liked to field whenever a record is created ou updated.
So I found here this solution that requires you to put the field you want to copy as a primary field
let dateT = base.getTable('Dates');
let dateQ = await dateT.selectRecordsAsync();
for (let rec of dateQ.records) {
let dateFieldID = rec.id
await dateT.updateRecordAsync(rec, {
'Date Link': [{id: dateFieldID}]
})
}
But I can’t make this because I use my primary field to make a resume for my Calendar view title record. Here is a simple example how my table looks like
Does anyone solve this or could help me ?
(sorry if my English is not so clear. I’m an Brazilian who is trying his best here)