Auto increment field works only if AllowNulls is set to False
. Then it should use the database’s numbers after saving. So the number you see might not be the final number, it may change after saving (e.g. if somebody else picked up your number).
Generally I would not recommend to use this as using numbers for unique identifiers brings terrible problems (e.g. not knowing the final number until you save).
For generating user sequences we have a GenerateSerial (sequenceCode) - ORIGAM Documentation - ORIGAM Documentation XSLT function that you would use typically in a state event (on saving).
What is your use case?