Can I change a lookup source using SPServices?

Mar 23, 2011 at 2: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,
Dave

Coordinator
Mar 23, 2011 at 2: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?

M.

Mar 23, 2011 at 2: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,
Dave

Coordinator
Mar 24, 2011 at 12:15 PM

Dave:

Doing something like trhis has been on the list for w while, but I haven't started on it. Check out  http://spservices.codeplex.com/workitem/5647. Is that basically what you are looking for?

M.

Mar 24, 2011 at 4:51 PM
Edited Mar 24, 2011 at 10: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: http://spservices.codeplex.com/workitem/7642)