Help

Re: Automation to change linked record based on manual field update

Solved
Jump to Solution
1721 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Franck
5 - Automation Enthusiast
5 - Automation Enthusiast

Hello all, I have two tables.

MONTHS : https://airtable.com/shrkKQn1rwn5Bcjks

DAYS: https://airtable.com/shraNAmopa2LDZQxV

Is there any way to make automation that each time I change manually the date of a record in DAYS table, it changes the field MONTHS wich is a link to the MONTHS table?

i.e.: When the date is 12/01/2023 (European) it must be linked to the "23/01" record in MONTHS table, and if I change manually this date to 12/02/2023, the automation should change the link to the "23/02"  record.

Thanks

 

1 Solution

Accepted Solutions
kuovonne
18 - Pluto
18 - Pluto

It looks like you already have a formula field that calculates the month from the date. If not, create one with DATETIME_FORMAT() that will match the value in the primary field of the months table.

Then have an automation with the "when record updated" trigger that watches for changes in the formula field. Follow that with an "update record" action that copies the value of the formula field to the linked record field.

Note that you may need to be careful when updating the date--do it by using the record picker, and not typing dates one character at a time. You may also need to be sure to pre-create all the month records in advance.

See Solution in Thread

3 Replies 3
kuovonne
18 - Pluto
18 - Pluto

It looks like you already have a formula field that calculates the month from the date. If not, create one with DATETIME_FORMAT() that will match the value in the primary field of the months table.

Then have an automation with the "when record updated" trigger that watches for changes in the formula field. Follow that with an "update record" action that copies the value of the formula field to the linked record field.

Note that you may need to be careful when updating the date--do it by using the record picker, and not typing dates one character at a time. You may also need to be sure to pre-create all the month records in advance.

Your question is a great way to get started in learning how to write Automation scripts for Airtable. Did you try out @kuovonne 's suggestions?

If you've never coded anything, it'll be intimidating whilst getting started - let us know if you have any questions as you progress.

Franck
5 - Automation Enthusiast
5 - Automation Enthusiast

Thank you very much Kuovonne! It works perfectly. Even better it creates a month record when it doesn't already exist. 

Franck_0-1673767989604.png