Receive Data from Web Service based on parameter passed

B

benoitc

When creating a new data connection to receive data from a web
service, if that web service requires a passed parameter in order to
return a value to the form, InfoPath prompts you to specify that
parameter with the "Set Value" button.

I was hoping you would be able to specify a form field for that
parameter, similar to the way it works when defining a connection to
submit data. However, when it prompts you for a parameter, I must
enter a literal parameter, I can't point to a form field and say "use
that value". I have tried using both "string" and "XmlNode" types
within the web service itself.

Short version of the question: Is there any way to get InfoPath to
allow you to dynamically specify the parameter based on the form
contents by telling it to use a field's value for the parameter,
rather than simply typing it in ahead of time?
 
S

S.Y.M. Wong-A-Ton

The receive data connection you created becomes a secondary data source (see
list of data sources in Data Source pane). The "form field" you are referring
to is not in the Main data source, but in a secondary data source of your
form.

What you can do is set the value of the field that you need to pass to the
web service in the secondary data source for the web service. And then when
you do a query on this secondary data source, the value you set will be
passed on to the web service.

You can set the value of the field in the secondary data source using either
rules or code.
 
P

Paul

Hi,

Are there any step-by-step "how to's" for doing this? I'm very new to
InfoPath 2007 and this is exactly what I need to achieve, its just a little
vague without an example or two.

Thanks in advance,
Paul
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top