spCascading Dropdown with repeated data

Jun 23, 2014 at 4:45 PM
Marc,
I have been able to use the cascading dropdown in your example, but I believe I have a data issue with using it for a projecct I am working on. I'm trying to port over an application to SP 2010 and the first thing is to have a form with Book, ModelYear and UMD. The data looks like so :
              Book  MY     UMD
01  2014   01F05
01  2014   01F06
01  2014   01F36
01  2014   01F**
01  2014   01G03
01  2014   01G05
01  2014   01G06
01  2014   01G**
01  2014   01*05
01  2014   01*06
01  2014   01***
04  2014   04C03
04  2015   04C03
04  2014   04C05
I have tried to implement this using the spcascading dropdown, without much luck. These columns are also multi selects in the form. The way this data is structured, is it possible to use spcascadingdropdown as it is intended? If not, can I use SPServices and to write custom code against SPServices.

Thanks for any information/assistance you can provide.

Patrick
Coordinator
Jun 24, 2014 at 2:30 PM
Patrick:

SPCasacadeDropdowns wants the data to be in relational lists. You've got everything in one list, but if you split it into three, you'll be all set. You'd have these lists:
  • Books
    --> Title (01)
  • MYs
    --> Title (2014)
    --> Book (lookup to Books.Title)
  • UMDs
    --> Title (01F05)
    --> MY (lookup to MYs.Title)
This is the best way to store the data in any case, as it follows good database rules.

M.
Jul 1, 2014 at 3:03 PM
Marc,

Thanks for the feedback. I have attempted to attach a screen shot of the issue I am running into. I created the Books and MY's lists the way you mentioned, but after I select say Book 01, in the MY selection box I see multiple (11) selections of the value '2014'. If there are repeating selections, like the '2014', I was hoping to only show one selection for '2014'.

Image

Thanks,
Patrick
Jul 7, 2014 at 9:13 AM
Marc,

I was hoping you might have some ideas on how to resolve this situation. Is it possible to only show the MY dropdown with only 1 value of '2014' instead of multiple '2014' values?

Thanks,
Patrick
Coordinator
Jul 7, 2014 at 1:22 PM
I think you need to use the matchOnId option because you have duplicate values. Check the docs for the particulars.

M.