Changing Dropdownlist contents on another list's change event

L

lwmartiniii

Scenario - I have a drop down list box which contains a list of
Vendors. When one is selected, I want to populate the contents of
another drop down list with the products associated with the chosen
vendor.

I'm new to InfoPath and am using Infopath 2007. Here's what I've
done. I have a data source for input that I get both Vendors and
their associated Products. I've added a handler which traps the
Changed event of first list box. I've gone into the code behind and
see that the event is monitoring the fact that the content of my
target XML (bound to my controls as the Main Data Source) has
changed. How do I gain access to controls on the InfoPath form from
the FormCode code behind?
 
K

kookie

This does not have to be done in the code behind, but if you want to access
this go to Tools > Programming > Microsoft Script Editor. You may want to set
your language first. Tools > Form Options > Programming , in 2007 this in the
navigation window on the left.

to do cascading dropdowns I am using one master list in WSS, but it can be
done with multiple lists.

Column 1 for dropdown 1 column 2 for dropdown 2 etc...

Because i have repeating items in column, which groups items in column 2 i
will need to only show one instance of each item. 2007 supports this without
adding conditional formatting, but it is not supported in 2003.

I add my data source called taxonomy and dropdown 1 is populated by this.
and i will add a filter. in the filter select This expression second field
enter:
not(. = ../preceding-sibling::dfs:Taxonomy/@Column 1)

Now I have populated dropdown 1 and no repeating items.
in dropdown 2 I add or select datasource and filter again, first filter
select an item for each of the three fields.
Column 1 - is equal to - dropdown 1
this is the cascading part. only items relavant to ur first selection will
display, now if you have repeating items in this column also you will need to
add an additional filter like you did int he previous one.
 

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