Apr 09, 2021 07:10 AM
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.
Solved! Go to Solution.
Apr 09, 2021 09:31 AM - edited Aug 03, 2023 07:42 PM
You could do this with an automation:
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.
Then, create an automation that triggers when your “Most Recent Sale” field has been updated. Have this automation update your number field with the value of your new formula field that you created.
Hope this helps! 🙂
Apr 09, 2021 09:31 AM - edited Aug 03, 2023 07:42 PM
You could do this with an automation:
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.
Then, create an automation that triggers when your “Most Recent Sale” field has been updated. Have this automation update your number field with the value of your new formula field that you created.
Hope this helps! 🙂
Apr 09, 2021 05:24 PM
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.
Jan 31, 2023 08:18 AM
@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
Jan 31, 2023 09:37 PM
@matt_stewart1 Please share the code that you've created so far, and we can help you refine it.
Aug 02, 2023 11:02 AM
I have been pulling my hair out for weeks trying to do this exact same thing. Are you able to please share the formula you used? Thanks!!
Aug 03, 2023 07:27 PM
A formula alone won't work. If the solution that @ScottWorld proposed isn't sufficient, my next go-do is code, and unfortunately I'm not in a position to delve into a code-based solution right now.