Skip to main content

I have a table for payment processing. When new records get created with a certain status, I would like to find the biggest check number in the table and add 1. Not sure if this would be using automation or formulas but thought I would start here. Thank you!

Hi,
Automation way.
You can create view sorted descending by check number.
Choose trigger ('When record created" + condition Status check OR  "When record matches condition" - the better way, but will work for any record, whose status will change to match condition, not just new created)
then add 'Find Records' by view, set limit to 1.
Then you need increase value, there are 2 ways:
- add field with formula 'Check number +1', possibly hidden. Use it's value
- add script step, fill input variable in left side, name it 'max' (or whatever you want), use list of 'Check number' from Find Records.
Script will be one-liner:

output.set('MaxPlus1',input.config().max[0]+1)

use output variable 'MaxPlus1' in your further actions

note that if you create record manually, the status is blank at the beginning. so, the hardest thing in your goal is to choose proper trigger. 


Reply