bpiNum, comma

M

MaryMc

We use Infopath 2003. I have a schema field, bpiNum, which is set as a
string. In the OnLoad event for the form, if bpiNum = "", then a stored
procedure (SP) is run to create the next bpiNum in a SQL table. This table
has a bpiNum int field which is set as an identity field, incrementing at 1.
It also has a date field. When the SP runs, it inserts a new record into
this table which contains the next bpiNum number and the current date. That
all works fine. The number is inserted as, for example: 1115.

If I save the infopath form after creating a "new" one, the bpiNum field
contains, for example: 1115.

I have a text box on the form to display the bpiNum field to the user. That
field always contains a comma: 1,115.

I have code in a Finalize function which occurs later on in the workflow
which queries the table looking for the bpiNum and if it exists, does
........[this and that]. It seems that even though the number in the schema
is: 1115, it never finds the number in this query seemingly because the form
is displaying 1,115.

Has anyone run into this before? Why does it contain a comma? What can I
do? Thanks!!
 
S

S.Y.M. Wong-A-Ton

Are you sure the data type for the field is set to "Text (string)"? It sounds
like it is set to "Whole Number (integer)" and that the format for the field
contains a comma.
 
M

MaryMc

Thanks for your response. I decided to do it a different way. In my SQL
table the field was an int so that it could autoincrement but everywhere else
it was a string. So I added a 2nd field to the table as a text field. Now,
as part of my stored procedur, it inserts the value in bpiNum into the text
field too. I use the text field in my form and it works perfect. Thanks
again.

S.Y.M. Wong-A-Ton said:
Are you sure the data type for the field is set to "Text (string)"? It sounds
like it is set to "Whole Number (integer)" and that the format for the field
contains a comma.
---
S.Y.M. Wong-A-Ton
http://www.bizsupportonline.net


MaryMc said:
We use Infopath 2003. I have a schema field, bpiNum, which is set as a
string. In the OnLoad event for the form, if bpiNum = "", then a stored
procedure (SP) is run to create the next bpiNum in a SQL table. This table
has a bpiNum int field which is set as an identity field, incrementing at 1.
It also has a date field. When the SP runs, it inserts a new record into
this table which contains the next bpiNum number and the current date. That
all works fine. The number is inserted as, for example: 1115.

If I save the infopath form after creating a "new" one, the bpiNum field
contains, for example: 1115.

I have a text box on the form to display the bpiNum field to the user. That
field always contains a comma: 1,115.

I have code in a Finalize function which occurs later on in the workflow
which queries the table looking for the bpiNum and if it exists, does
.......[this and that]. It seems that even though the number in the schema
is: 1115, it never finds the number in this query seemingly because the form
is displaying 1,115.

Has anyone run into this before? Why does it contain a comma? What can I
do? Thanks!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top