Help

Re: Automation Question. Reduce number field value by one every day

1829 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Stu_Smith
6 - Interface Innovator
6 - Interface Innovator

I have a database with a number field that external automation will set to a value at certain times. I then require that value to be reduced by one every day until it reaches zero again.

I tried to set this up using Find Record and Update Record in automation but it doesn’t appear that it can do this with multiple records in one table at a time. :grimacing:

Is there a way to set this up? Possibly with some scripting?

5 Replies 5

Hi there! Yes, Airtable automations can’t perform calculations at this point. So this needs to be handled with a script (within automations). Trigger would be at a scheduled time daily and then the script runs and deducts 1 from a given number field. Is this always one specific field or various fields? If it’s one specific field, it would work like this:

image

image

image

If you are on the free plan and do not have access to Automation Scripting, you can add this formula to count the number down every day. Then an automation that triggers on the update of the formula, to copy the formula result and update the number record

Number-DATETIME_DIFF(TODAY(),DATETIME_FORMAT(CREATED_TIME(),'L'),'days')
Stu_Smith
6 - Interface Innovator
6 - Interface Innovator

Thanks! I’ll check out these options. I’m on the paid plan btw.

For now I set it up in the Integromat scenario that does other stuff with the database and tbh it doesn’t use up too many extra operations so I may leave it like that for now. :blush:

It is for a number of fields.

you can still solve by automations, creating formula field with your field-1 and put it’s value where you need. or if your table should not contain extra fields, create mini-table for that
image