Hello everyone,
I am very new to programming infopath and to xml. Is there a good reference book that shows good examples of how to work with Web
Services? Or a good book on XML or tutorial about XPath and stuff like that? It seems that in order to integrate Infopath with WebServices and Sharepoint, I need to know those along with XML and XPath and Serializtion/Deserialization, etc. So much stuff.
Anyhow, now to my question. This is very basic. All I want to do is get the value of a textbox and then after tabbing off of the control to call a web method that checks if customer exists, and if so return an integer=1 else return 0.
I have created the Web Method that takes an input string parameter and returns an integer parameter. I also have a textbox called txtQuery where the RULE is 'Set Condition = txtCust is not blank' and where the Action is 'Query using a data connection to a Web Service'.
I have another textbox called txtSubmit which is the same as above, but the Action is 'Submit using a data connection to a Web Service'.
Both textboxes call the same web method.
Then I have another textbox called txtReturn which which has a datatype of Integer, and for the Default Value a formula from an 'Insert Field or Group' where the Data Source is the same Web Method the other 2 txtboxes called.
Now when I tab off of the txtQuery my Web Method gets called and is passed the value in the textbox. However when I debug my C# app, I notice that the input value is always a NULL string. The method calls a Stored Procedure to check if the customer exists and then returns an int to the txtReturn correctly. The problem with this is that I need to be able to send the value of the txtQuery to my web method, but it doesn't.
If I insert something tab off of the txtSubmit and debug my C# app, I see that the input string is passed correctly, but now the txtReturn is not set.
DOH!!!
I have already created another Web Method where it populates a drop down list with all the customers on my Infopath form, but since there are like 200 customers, the list takes awhile to load and when you choose a customer, it takes like 1 minute to populate. This is not desirable.
Anyhow, if anyone knows how to solve this or has a better solution, please let me know. Its such a simple question, but takes forever to figure out, and you can't find really good examples of this material online. There are examples but since I'm new to this stuff, its kinda confusing.
Recap: All I want to do is check if what the user entered in a textbox is a valid customer, and if so, either change views or enable controls on the Infopath form.
Also, sorry for such a long post, I just wanted to make sure I had enough details.
Oh yeah, a recommended book or links for understanding how to integrate Infopath using WebService and Sharepoint would also be nice.
Oh yeah, I'm glad to be a part of this forum. Seems very helpful!
Thanks in advance,