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

Using SPCascadeDropdown for multiple items on the same list?

Oct 4, 2010 at 4:08 AM

I have a situation where I want to duplicate 4 fields from ListA to ListB so I can see all those fields in a view of ListB.  It strikes me that SPCascadeDelete can be used to accomplish that quite easily, if it can be used 3 times over for the same list on a single input form.  The first instance of SPCascadeDelete works fine for me (since the function doesn’t care whether the list being referred to is really a “relationship” list or just a regular list), but the second instance is not working for me.  I assume that is because I can’t invoke the function a second time on the same page referring to the same list because variables that were set in the first instance are needed in the second instance, so they collide.
I theorize that if I could create a second and third version of SPCascadeDelete (within SPServices.jquery) called SPCascadeDelete2 and SPCascadeDelete3, where all the variable names have a 2 or 3 appended to them, respectively, I could get this to work.
Not being a coder, I don’t know  how successful I will be at attempting this fix.  Any hints on how to do this?

Oct 4, 2010 at 4:14 AM


SPCascadeDelete is only going to help you display things on the forms for your "master" list. You can have multiple "cascades" -- I've had up to five or six in a form and the only issue is that things slow down a bit with the multiple Web Services calls.

I'm not sure that I understand what you're trying to do, but it sounds like something I'd do with a Data View Web Part (DVWP). If you want to show 4 column values from List A in a view of List B, I'd assume that there's some column which acts as a common key between them. I'd create a DVWP which uses both lists as DataSources, filtering in the XSL with those common values.


Oct 4, 2010 at 4:21 AM

OOps. I just noticed I called it SPCascadeDelete, not SPCascadeDropdown.  My bad.  I recognize that the function will only display things on the form for my master list. That is sufficient for my needs. It would save having to scroll through an entire list on each dropdown and then manually select the corresponding fields.  In some environments I work in I cannot use SPD, so I can't rely on always being able to build a DVWP to do it.  When you have had multiple cascades on the same form, were they all calling from the same relationship list?

Oct 4, 2010 at 4:26 AM

No, to keep things relational, you really need a relationship list per relationship. Otherwise you end up with duplicates, and it's realy tough to manage the relationships.