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

Can I change a lookup source using SPServices?

Mar 23, 2011 at 3:03 PM

Hello.  If I have a column that references a value from another list, can that be changed on the fly using SPServices?  It's something similar to SPCascadeDropdowns but I don't need the cascading functionality.  I need this functionality on the Edit and AddNew forms, and then on document ready, I'd like to provide some CAML and have the dropdown values be populated with the values from the CAML statement.  I hope this makes sense.

Thank you,

Mar 23, 2011 at 3:36 PM

It sounds like you may need to build something for yourself using the Web Services, specifically GetListItems.

Can you tell me a bit more about your requirements? Is it that you simply want to filter a single dropdown based on something?


Mar 23, 2011 at 3:47 PM

Thank you Marc!

I think you're right Marc with that something being the result of a CAML query.  I have a field called FACTOR in a list (A) that references Title in another list (B).  Now that just won't do.  There is also a year field in both lists (A and B).  Now  I need to filter on the year field as well.  So instead of just pulling in Title, I need Title where Year=2011; where 2011 is the value of the year field in list A.

Thank you,

Mar 24, 2011 at 1:15 PM


Doing something like trhis has been on the list for w while, but I haven't started on it. Check out Is that basically what you are looking for?


Mar 24, 2011 at 5:51 PM
Edited Mar 24, 2011 at 11:11 PM

That sounds exactly like what I'm looking for.  Is that code example something that I could just include along side SPServices as an include? 

Thank you very much Marc!

(Marc, that sounds familiar to this one as well: