Link to home
Start Free TrialLog in
Avatar of Bryan Pigg
Bryan PiggFlag for United States of America

asked on

Web Services and Infopath 2010

I created a stored procedure that is attached to a database in sql.  I then created a SOAP endpoint that offers up the stored procedure as a web service.  I then create an Infopath form and use the web service as the data connection.  In the form there are several fields.  All of the fields will not have data when the form is submitted.  The data that is entered into the fields on the Infopath form passes to the sql table.  The problem is that the fields that are blank on the form are being represented by a zero in the table instead of NULL.  All fields are of the float data type. If data is not entered into a field on the Infopath form I need NULL to be passed to the table.
Avatar of Clay Fox
Clay Fox
Flag of United States of America image

In form properties, on one of the last tabs there is a place to specify how to treat blank values. I beleive by default it is 0 rather than a blank.

I would try changing that.
Avatar of Bryan Pigg

ASKER

I did try changing that and it did not work.  That setting is described as "Select this option to have Infopath treat blank values in mathematical operations as zero."  I believe this has to do with expressions embedded in fields.
I think you would have to make the conversion or fix in the webservice then.

Maybe replace the value to Null there.
If I change the data type to varchar it will leave a blank value. Could I specify that all my parameters be varchar and convert back to decimal before writing to the database.

Just odd how infopath just assigns a 0 to an empty parameter.
ASKER CERTIFIED SOLUTION
Avatar of Clay Fox
Clay Fox
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial