Populating a combo box in Infopath from a webservice

Aim: to create an Infopath form that displays a list of companies in a combo box and displays additional information when a company is selected.

The data will be served by a WCF webservice talking to a SQL Server backend. In theory I should be able to use a stored procedure (and associated methods in the webservice) to get a list of all the companies and their associated ids, populate the combo box in Infopath, then link the selection of the company name to its id and then pass that id on to another stored procedure to return the additional information.

However, when I try to wire up my webservice method to return all companies, I can't plug the company name field into a single combo box as the data returned is repeating.

Am I doing this wrong? Should I just use a single method that returns all company information (there's about 700 or so) and then create a filter on the company name field instead?


the combobox returns one single company id. This id can be used to search the company name in the company list returned by the webservice.

Can do without coding:

Create a rule 'CompanyIDChanged' on the combobox. Then create an action 'Set a fields value' for this rule. Set the form field 'CompanyName' to the value 'CompanyName' of the webservice. Use a filter on the value to set CompanyName for the correct CompanyID. The filter should be 'CompanyID' in the combobox = 'CompanyID' in the webservice.

Regards Jack Graus

Need Your Help

how do I show a string as html content in web form

c# asp.net webforms

I am trying to retrieve a html document to show in my web page, now the content comes from database as a string. Now I know there is a way to do this in win forms using Browser.DocumentText. But ho...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.