Monday, December 29, 2003 10:29 PM Jan Tielens

Fun with InfoPath: Dynamically Populate a List by Using a Webservice with a Parameter

Some time ago I started to explore InfoPath, so far it was a pleasant journey. Everbody (including myself) seems to be requesting an user-control version of InfoPath so you can have InfoPath forms in your own Smart Client applications. This would be really great, top of the bill would be integration in Visual Studio.NET, but maybe that's a little bit too wishfull-thinking. Another nice feature would be a free version of InfoPath, without the functionality to create and edit forms. Like there is a free Acrobat Reader and a commercial Acrobat Writer. Microsoft says it's hearing these requests, but has anyone already an idea if these features will be available?

Anyway, InfoPath is great when you walk between the lines. As soon as you step out of these lines, it becomes a little bit dirty, especially if it involves scripting (VBScript and JScript). That's right, it's a pitty that you can not use managed code (e.g. VB.NET or C#) in InfoPath (add this feature to the whish list!). What I wanted to accomplish was a form with a dropdown list of customer names, which could be submitted as a part of an invoice (for example). Filling a listbox with customer data is pretty simple using secondary data sources: you can have a webservice as the data source of the dropdown list. But what I wanted to have was an additional textbox in which you could specify a part of the name of the customer, so only a subset of customers would be listed (avoiding fetching a lot of data and improving the user experience: shorter list). Thanks to Joel Alley (Msft Developer Support) I found following KB Article, which is almost exactly what I was looking for:

Microsoft Knowledge Base Article - 826994
How To: Dynamically Populate a Drop-Down List Box by Using a Web Service
SUMMARY
The Microsoft Office InfoPath 2003 user interface does not permit you to specify a value in an input field and then have that value passed to a Web service that will in turn populate a drop-down list box with the results that match the value in the input field. This article describes how to call a Web service to dynamically populate a drop-down list box that is based on the selection in a second drop-down list box.

Filed under:

Comments

# re: Fun with InfoPath: Dynamically Populate a List by Using a Webservice with a Parameter

Monday, December 29, 2003 5:28 PM by Laurent Kempé

And what about having the possibility to post to WSE Web Service?

# re: Fun with InfoPath: Dynamically Populate a List by Using a Webservice with a Parameter

Monday, December 29, 2003 5:39 PM by Jan Tielens

Hi Laurant, what do you mean by WSE Web Service? DIME attachements, encryption, security, ... ?

Jan

# re: Fun with InfoPath: Dynamically Populate a List by Using a Webservice with a Parameter

Monday, December 29, 2003 6:16 PM by Wilco

And what about being able to submit rich text to for example a webservice? Last time checked I noticed it sends an XmlNode to the webservice. On the webservice however I could only get a certain bit of the text - if I would submit "hello <b>there</b>", I would only be able to get "hello", as if the rest was never sent.
I think there was a workaround for this by doing some scripting. It would be nice however if this kind of trivial stuff would be easier.

# re: Fun with InfoPath: Dynamically Populate a List by Using a Webservice with a Parameter

Tuesday, December 30, 2003 2:55 AM by Laurent Kempé

Yes Jan I mean exactly that!

# re: Fun with InfoPath: Dynamically Populate a List by Using a Webservice with a Parameter

Tuesday, December 30, 2003 3:03 AM by Laurent Kempé

Thanks Phil for the pointer, I did not realized that there were a project toolkit for Visual Studio. I did use the Word toolkit to build the article publishing on my site but did not know that there were one for InfoPath. Thanks !!!

# re: Fun with InfoPath: Dynamically Populate a List by Using a Webservice with a Parameter

Tuesday, December 30, 2003 5:40 AM by Jan Tielens

Phil

I don't think the InfoPath Project Toolkit for VS.NET is already available. Please correct me if I'm wrong!

# re: Fun with InfoPath: Dynamically Populate a List by Using a Webservice with a Parameter

Tuesday, December 30, 2003 6:13 AM by Laurent Kempé

Right :-( They talk about it in the ppt presentation, but I could not find anywhere !

# re: Fun with InfoPath: Dynamically Populate a List by Using a Webservice with a Parameter

Wednesday, August 02, 2006 7:50 AM by Vivek

Hi

I'm populating InfoPath 2003 using SharePoint list. In my SharePoint list I’m using paging. Because of that in my InfoPath form it shows only the first page records. Is there is any other to get full data from a paging enabled SharePoint list to InfoPath.

Regards

Vivek.T