Hi leonbns,
Check the following link
http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=2102
I have given code for a webservice that increments value in a text file by 1, each time it is called and this webservice returns the incremented value.
Set the value in the text file to 0 initially.
Call this webservice when u submit the form.
Set the "followNumber" field to the incremented value returned by the webservice.
Promote the 'followNumber' field so that u have a new incremented followNumber each time u submit a new form.
For example:
The first time u submit the form,ur webservice will set the value in the text file to 0+1=1 and will return 1.
So ur followNumber field will be set to 1,and ur sharepoint column will have 1, since u have promoted the followNumber field.
Similarly the next time u submit,the web service updates the text file with 1+1=2 and returns 2.
Regards,
Abhishek