Hi Franck!
I created an infopath form that will be published to a sharepoint site and the workflow will be handled by biztalk. This form will be accessible throughout the organization through the network (sharepoint). The form itself, after processing, will have sharepoint as the final repository. For the dropdown and other lookup values, I made use of a database secondary datasource. Now, in the form, I have a field called 'Order Number'. This is supposed to be a unique number for every form. The bosses wanted to format the Order Number as YYYY-XXX where, YYYY is the current year, and XXX is a 3-digit number. ex. the first time the form will be filled out, the Order Number field should be read-only and automatically say 2005-001, the next form should be 2005-002... 2006-001..etc.
I was thinking of a way to do this in infopath either through the formload event or through the default value formula builder for the field. So, I thought I needed a marker that tells me what the last number was, so I created a simple xml file containg just two elements, the year and the number. I then added this xml file as a secondary data source, and set the default value for the Order Number field to com from this data source.
Now, the problem is I can't increment the initial values of the secondary xml datasource. Is there a way of doing this? Thanks.