The easiest way I've found to do this is to use Environment Locks to store a value in the Last Comment field. You have to have a very solid piece of logic/code in place to properly manipulate it, but I currently have an object in production that dynamically determines a connection number to use for a web service based on whether other sessions are currently using a connection. You'll have to deal with racing conditions so you may want to implement a wait of some kind.
The second easiest way is to use a work queue item, which would be similar to Environment Locks except is less susceptible to data loss.
The next way would be to use a separate database (which could actually just be a file stored in a shared location) that the automations can query to determine what the next ID should be.
The best and most legit way would be a web service set up to return a value that should be used. But that sounds way over-engineered for such a simple task.
------------------------------
Dave Morris
3Ci @ Southern Company
Atlanta, GA
------------------------------
Dave Morris, 3Ci at Southern Company