Hi,
i think that functionality like this is not presented out-of-the-box, but this can be achieved using spel customization, if you're pretty familiar with it, algorithm could be:
- publish new factory (db table), single attribute (ex: ref_num) should be enough;
- register new method, for example call it: sequence_init, which should return incremented sequence number;
- register new trigger for decided object (nr in your scenario) which will fire on new object;
- simply call that method and assign returned value.
calling new method instead of simple updating value in an outer factory should be more stable and shouldn't perform sequences conflict.
Regards,
cdtj