Help

Upcoming database upgrades. Airtable functionality will be reduced for ~15 minutes at 06:00 UTC on Feb. 4 / 10:00 pm PT on Feb. 3. Learn more here

Use automation to count up by one whenever field is edited

Topic Labels: Automations
Solved
Jump to Solution
597 3
cancel
Showing results for 
Search instead for 
Did you mean: 

I would like to have a number field that increments by one whenever the “most recent sale” date field is edited so we can sort products by the number of sales.

How do I make an automation that does cellA+1 when another cellB is updated?

edit: If anyone knows of a way to do this without a third field, I’d be obliged.

1 Solution

Accepted Solutions

You could do this with an automation:

  1. Create a formula field that already has the next number ready to go. This formula field would just be “CellA + 1”. Then, you can hide this formula field because you won’t need to see it.

  2. Then, create a new field of type “Last Modified Time”. Customize this so that it only updates when your “Most Recent Sale” date field is edited.

  3. Then, create an automation that triggers when your “Last Modified Time” field updates. Have this automation update your number field with the value of your new formula field that you created.

Hope this helps! :slightly_smiling_face:

See Solution in Thread

3 Replies 3

You could do this with an automation:

  1. Create a formula field that already has the next number ready to go. This formula field would just be “CellA + 1”. Then, you can hide this formula field because you won’t need to see it.

  2. Then, create a new field of type “Last Modified Time”. Customize this so that it only updates when your “Most Recent Sale” date field is edited.

  3. Then, create an automation that triggers when your “Last Modified Time” field updates. Have this automation update your number field with the value of your new formula field that you created.

Hope this helps! :slightly_smiling_face:

This could also be done with a script action (if your base is in a Pro-plan workspace or higher). The script could read the existing number and bump it up by one.

The only problem is that it’s entirely possible that a single edit of the date might be viewed as multiple edits. There are ways around this, though. If you’d like to dig deeper on this topic, just holler.

@Justin_Barrett trying to do exactly as you say... add 1 to the value using a script action in my automation.

 

I managed to figure out how to pull in the record values using input variables, but don't know how to make the new number be a +1