How to populate multiple fields from a secondary data source

K

Keith B

A drop-down combo box is populated by a secondary data source with the
following structure:

services
--service
----name
----designation

The user needs to select a service and somehow get both the service/name and
the service/designation fields into the Main data source. I have
experimented with the Rules part of the combo box properties without finding
anything that works.

Thanks,

Keith
 
K

Keith B

This is the formula I ended up with using Rules and Filters:

xdXDocument:GetDOM("services4testing")/services/service/designation[../name
= current()/ut:unitTest/ut:service]

"services4testing" is the secondary data source, and
"current()/ut.unitTest/ut.service" references a field in the main data
source.

Note that the formula wizard came up with a full-path expression, and I
modified it to use "current()/". I'm not sure if that is correct, however it
seems like the full-path expression doesn't say which one of the unitTest
records to use.

The problem I am having is that the field in the main data source
(ut.designation) that the Rule is supposed to modify never changes.

Any idea what I may be doing wrong.

Thanks for your help,

Keith


"Greg Collins [InfoPath MVP]" <Greg.Collins_AT_InfoPathDev.com> wrote in
message You will need to use Filters combined with your rules. You must filter the
secondary data source based on the chosen value from the drop-down list, in
order to correctly identify the name and designation values to populate your
main DOM with.

--
Greg Collins [InfoPath MVP]
Please visit: http://www.InfoPathDev.com



A drop-down combo box is populated by a secondary data source with the
following structure:

services
--service
----name
----designation

The user needs to select a service and somehow get both the service/name and
the service/designation fields into the Main data source. I have
experimented with the Rules part of the combo box properties without finding
anything that works.

Thanks,

Keith
 
K

Keith B

Answering my own question (for once). It turns out that I was on the right
track. I just needed to change my formula to:

xdXDocument:GetDOM("services4testing")/services/service/designation[../name
= current()]

Thanks,

Keith
 

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