I have a relatively complex InfoPath 2007 form without code that is misbehaving and I don't know why.
The form has one field that is used to create a unique name and a unique key in SharePoint and an Oracle database. The field is populated using a rule under Form Options/Open and Save. The rule simply says if the field is blank, call a webservice that creates the unique number and populate the field.
What the web service does is to grab the "next" (unused) number from a database and add a prefix to it, for example it gets 851 and adds CO2010 so the field is populated with "CO2010851". The same web method adds a new record in the database with this number so a record exists for this number and cannot be used by another form being opened.
After the field on the form is populated with the number the rest of the form acts normally. When the form is finally submitted, the fields are copied to SharePoint and to the database through another web method.
The problem is, when a new form is opened for the first time, somehow the webservice is ALWAYS called twice because it creates two records in the database with sequestion unique numbers, this is before the form is submitted, just when the form is opened for the first time. I know the webservice is actually called twice because that is the only way the prefix for the number could be added and the number itself incremented. What I can't figure out is why the webservice is called twice.
Thanks for any help you can give.