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

SPServices Cascading Drop Down CAML issue

Nov 17, 2011 at 9:44 PM


I have a scenario where I wish to use the same set of cascading drop downs across two lists. These lists are Hardware and Mobiles. Each of these lists have columns which are lookups to other lists, I have added the SPServices code to the newform and edit form and everything is working fine... but.

In the first dropdown this value is Item, where there are different items like (Laptop, Desktop, Mobile Phone and Tablet), in this list I also have a choice column for Type (Hardware / Mobile).

The second dropdown list is Manufacturer (this has a lookup to the Item list and also a list of Manufacturers (Apple, Dell, Samsung etc).

The third (and final) drop down is for Model Number. In the Model list I have the Model Number, a look up to Manufacturer and also a look up top Item.

What happens is when there is a manufacturer which has models across different Items. Take Apple for example, in my Manufacturer list I have two entries for Apple, one for Mobile and one for Tablet. When I get to the last drop down, the models are both Mobiles AND tablets. 

I have added the CAML query to filter on the look up column for Item and it works, however I need the value to be dynamic based of the selected value of my first drop down. 

Is this possible with SPServices? Perhaps my list structure is wrong or I am thinking about the solution in the wrong way! 

Any help greatly appreciated


Nov 19, 2011 at 12:18 AM

Not possible in the current version, gregraymond.  I altered the base SPServices code to allow for dynamic CAMLQuery options.  See if this will meet your needs.