Jan 14, 2023 01:00 PM
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
Solved! Go to Solution.
Jan 14, 2023 03:22 PM
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.
Jan 14, 2023 03:22 PM
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.
Jan 14, 2023 04:14 PM
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.
Jan 14, 2023 11:33 PM
Thank you very much Kuovonne! It works perfectly. Even better it creates a month record when it doesn't already exist.