Editor's note: Contributor Chris Grist is a Senior Technical Consultant for Loftus IT. Follow him @gristdog
In Part 1, we created a new form that has the components required for us to create a currency conversion component. We have a working calculation working from a button located on the form, however this is using a static rate.
At the end of Part 1 we ended up with a form that looked a little like this:
- Connect to a Currency Conversion Web Service.
- Provide drop down lists of available currencies.
- Set the Exchange Rate relevant to our selected values.
You have now successfully added the web service in to InfoPath. The next step will be to add those useful drop downs we just saw in to the form for the end user to utilise in selecting valid currencies.
In the Fields pane select the drop down that currently has Main selected; select the secondary data source of ConversionRate. Expand the structure, and inside queryFields you can see the two values we set earlier, FromCurrency and ToCurrency.
Simply drag and drop these on to the form, a menu will appear and you will want to select drop down box as the type of field to utilise. If you preview the form now your drop down lists should be functional.
InfoPath Currency Conversion: InfoPath Currency Conversion (2)