We had investigated these as options - there are some situations that the tracking code will work for us but it is not guaranteed to be unique due to a bug in TM 4.06.
Submission Number is also problematic as it is generated on every form load and ICT monitoring software loads a test form every minute or so. Currently our prod SubmissionNumber's are over 1 million and we have some use cases that call for a 6 digit number, for example.
We are looking for a more generic solution, at this stage our thought is to create one or more oracle sequences in the txmanager tablespace and prefill forms with them as required. Ideally it would be written to the xml on submission which I believe is possible in TM 4.2 that way we don't have gaps in the sequence if forms are not submitted.
Each form render generates a new submission object in TM. The submission object has at least two unique IDs you may be able to use for your purpose, the Tracking Code and the Submission Number (aka Submission ID).
The Tracking Code is a unique six character code e.g. JLQ12E
The Submission Number is an auto-incremented number e.g. 12345
The data can be accessed by binding to: