use on drop down's value to define what's in a second drop down

B

bleitner

What I'm looking to do in a broad sense is utilize the value selected in one
drop down to define what a second drop down's selections will be. For
instance, the first drop down as a list of subsidiaries in it. Each of those
subsidiaries has different departments and department codes associated with
it. When someone selects a subsidiary in the first drop down, I want the
second drop down populated with the correct corresponding list of departments
and department codes.

Here's the catch - The list of departments and codes are in a SharePoint
site, but I don't have access to the server to use a web service. I'm
stating this because in a previous post it was suggested that the only way to
do what I wanted was to use a web service. But I also limited the scenario
to having a different SharePoint list for each subsidiary and stating that I
wanted to have the first drop down define what data connection to use to
connect up to the individual lists. I've thought about another way to do
this - to combine all the subsidiaries into one big list on SharePoint and
either have a seperate column with the subsidiary name, or in one column
preface the subsidiary name followed by the department name. For instance,
Subsidiary 1 - Department 1, Subsidiary 2 - Department 1. By doing this I
eliminate the need to have multiple data connections, but now I have to
filter the data. So when someone selects subsidiary 1 in the first drop down
the data connection pulls the entire list, but filters the list to only
display departments related to subsidiary 1. Is this possible, and if so,
how would I go about doing it?

I'm also open to any other suggestions of achieving this outcome.

Thanks,
Bob
 
B

Bart

hi

hope u have solved the problem by now....

i dont remeber where i have seen the posting but as far as i remember u can
do the following.

create second dataconnection xml resource file say x. the file should look
something like

<?xml ....?>
<list>
<Subsidary1>
<name>IT</name>
<Department1>CS<department1>
<Department2>xyz<department2>
<Subsidary1>


<Subsidary1>
<name>IT2</name>
<Department1>CS2<department1>
<Department2>xyz2<department2>
<Subsidary1>

<list> //end of fiel


then what u can do is once the value in the first dropdown is selected u can
read the xml of the first dataconnection(all the subsidary and all the
departments in one single list) and use xpath to get all the nodes
corresponding to the selectecd value from dataconnection DOM and add those
nodes to the second data connection.

then refresh the view
and query the data connection.


option2

u can use xpath directly in the second dropdownlist that what my colleauge
told me give it a try.
all the best mate
Bart
 

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