Really confused here! RE Drop down Boxes

C

Chris

I am creating a shipping form for a company using info path and I thought I
understood how to do this but after hours of frustration I could really use
some advice.

All I want to do Is have a drop down box of a listed company directory and
when that company is selected, the shipping address is filled in, in the
fields provided.

I have created a data source (access) of the company and addresses and I am
able to link the drop down box below, listing all the companies, but when a
company is selected I either can set it up that the address does not link up
properly (listing the 1st address on the data source, selecting a new
company will NOT change this field, another way I seem to be able to get
data listed is when take my data source and drag the address field over,
this creates a "repeating field" which intern lists ALL the address to of
the companies listed, if I change the binding to the original drop down box
with the company lists then I just get a duplicate of the dropdown box.

How can I have a drop down box of all the companies linked to addresses?

Any info to guide me on this path "hehe" will greatly be appreciated.
 
P

Patrick Halstead [InfoPath MVP]

You can use a filter and some tricky xpaths.
Can you reply with the actual schema and specify which address node you are
trying to link to the company?
Is this part of your main data source or do you have a secondary data
source?
Is the data part of the form or is it being querieed from a DB?
 
C

Chris

The data is part of a database that I have added as a data source into the
form it is being querieed. this is part of my main data source. I will try
some of the suggestions below and post with me results.

thanks
 
S

Shem

Yes it is possible. And the best news - you can do this without code!

Try this as an example
(1) Create a secondary data source to connect to your database
(2) Add a drop down list field to your form and set its properties to
retrieve data from the secondary data source you created.
(3) Add another text field to your form
(4) Add a rule to your drop down list that sets a field's value. My rule
looked like:
field6 = @Assigned_To[@Title = field5]
Here what I am doing is setting field6 (my textbox) to the value in the
Assigned_To field in the database where the title equals the
title I selected from my drop down list (field5). I'm using filtering.

I got this data from Michelle for the same issue except I was using sharepoint
 
C

Chris

Thanks for the help, a few more questions and I think I may have it.

I add the drop down box (FIELD 10) and link it to my other data source.
when I go to preview the form I see the data source listed. I then add a
normal text box (FIELD 11), then I go back to (FIELD 10 and right click to
see the drop down list properties) Now ??? Add a rule? then add a an
action??? I have no idea there the @assigned_to area is.

I can basically link field 10 to 11 and I get a duplicat for field 10 but I
can't get field 11 to show anything other than whats in box 10

Can you please give me a step by step from tis point?

Thanks

Shem said:
Yes it is possible. And the best news - you can do this without code!

Try this as an example
(1) Create a secondary data source to connect to your database
(2) Add a drop down list field to your form and set its properties to
retrieve data from the secondary data source you created.
(3) Add another text field to your form
(4) Add a rule to your drop down list that sets a field's value. My rule
looked like:
field6 = @Assigned_To[@Title = field5]
Here what I am doing is setting field6 (my textbox) to the value in the
Assigned_To field in the database where the title equals the
title I selected from my drop down list (field5). I'm using filtering.

I got this data from Michelle for the same issue except I was using
sharepoint


Chris said:
I am creating a shipping form for a company using info path and I thought
I
understood how to do this but after hours of frustration I could really
use
some advice.

All I want to do Is have a drop down box of a listed company directory
and
when that company is selected, the shipping address is filled in, in the
fields provided.

I have created a data source (access) of the company and addresses and I
am
able to link the drop down box below, listing all the companies, but when
a
company is selected I either can set it up that the address does not link
up
properly (listing the 1st address on the data source, selecting a new
company will NOT change this field, another way I seem to be able to get
data listed is when take my data source and drag the address field over,
this creates a "repeating field" which intern lists ALL the address to of
the companies listed, if I change the binding to the original drop down
box
with the company lists then I just get a duplicate of the dropdown box.

How can I have a drop down box of all the companies linked to addresses?

Any info to guide me on this path "hehe" will greatly be appreciated.
 

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