So - I generally don't recommend this, because unless you get really fancy you always a chance that two users will get the same number. However, if you must, here's how I'd do it. I'd keep the XYXYX data in its own field and promote that, so I can query on just that piece. Add a data connection to the library that includes the XYXYX field. Don't run the query on load. On your submit rules, if the form name is blank (just add a formname field to your data source, use it in your submit connection as the name of the form), set the XYXYX query field to the XYXYX value in the current form. Execute the query. Then use the count function to find out how many rows are returned. If you search this forum for zero padding, you should find posts explaining that part. :)
Hilary Stoupa
