Solved

Web Services and Infopath 2010

Posted on 2010-11-18
5
1,190 Views
Last Modified: 2012-06-21
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.
0
Comment
Question by:Bryan Pigg
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 28

Expert Comment

by:clayfox
ID: 34165360
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.
0
 
LVL 2

Author Comment

by:Bryan Pigg
ID: 34165388
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.
0
 
LVL 28

Expert Comment

by:clayfox
ID: 34174539
I think you would have to make the conversion or fix in the webservice then.

Maybe replace the value to Null there.
0
 
LVL 2

Author Comment

by:Bryan Pigg
ID: 34174762
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.
0
 
LVL 28

Accepted Solution

by:
clayfox earned 500 total points
ID: 34174795
Yah InfoPath defaults all decimals to 0. Have you tried binding a text box to the decimal field and see if it still defautls it to zero. I am not sure it is the field or the control that is putting the 0 in there.

I think your idea would be one fix.  You can still format your controls liek a decimal in InfoPath but it will accept blank values as well.
0

Featured Post

Ready to get started with anonymous questions?

It's easy! Check out this step-by-step guide for asking an anonymous question on Experts Exchange.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Before you can digitally sign infopath forms, you must have a digital certificate. Microsoft Certificate Services will need to be enabled on a Windows Server 2008 to facilitate the creation and verification of the digital certifciates on the web ser…
First of all let me say that the only language that I speak is English, but in answering questions here I often come across people whose English skills are not the best and I’d like to be able to communicate better with them, and the following descr…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

635 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question