This project has moved and is read-only. For the latest updates, please go here.

help get column values LIST A and LIST B

Mar 2, 2011 at 5:37 PM

Hi its my first time to post.

I have a List and have a lookup from other list let say..

List A  (both field are text)
            Column:        Value 

item 1:  Company = "ABC"                

           Description ="ABC is the best company"

item 2:  Company ="DEF"

            Description ="DEF is the 2nd best company"


LIST B (fields Company =lookup, description is readonly text)

             Company =  lookup from LIST A (Company)

            Description =(depends on the selection of Company lookup then it will load the description)

My requirement is when I Choose any values in the company lookup in LIST B  the description should get the value of the description from LIST A  


1. LIST B   Company lookup selection ="ABC"  

           output of description = "ABC is the best company"

2. LIST B   Company lookup selection ="DEF"  

           output of description = "DEF is the 2nd best company"


Please help me achieve this using jquery and spwebservice.







Mar 4, 2011 at 5:55 PM


You'll want to use GetListItems for this. Working with Lookup columns can be a little confusing, and you can look at some of the functions in SPServices to see how I do it.

One other comment: You're breaking the relational database rules by copying the description into List B. Think about what the use cases are for seeing it and consider using a DVWP in CrossListMode to display the data instead. The reason for this is that if the description changes in List A, your values will be out of sync.