Nov 11, 2021 11:22 AM
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)
Solved! Go to Solution.
Nov 12, 2021 09:28 AM
A couple things:
It sounds like you just want to copy the {Source Date}
field into the {Dates Link}
field whenever the {Source Date}
value changes. This doesn’t require a script.
Set your Automation trigger to be whenever a Properties
record’s {Source Date}
is updated. Then have an Update Record step set up like this:
Nov 12, 2021 09:28 AM
A couple things:
It sounds like you just want to copy the {Source Date}
field into the {Dates Link}
field whenever the {Source Date}
value changes. This doesn’t require a script.
Set your Automation trigger to be whenever a Properties
record’s {Source Date}
is updated. Then have an Update Record step set up like this: