Cascading Displays Duplicate Choices When Info Is Required

Apr 5, 2013 at 3:32 PM
Edited Apr 5, 2013 at 3:33 PM
Greetings

Background:
I have a parent list (PL) and a child list (CL) I use as the source for lookup categories to a document library in SP 2010. SPServices suites my needs perfectly for cascading the document categories.

Issue:
I have users that upload documents to the library without categorizing the document via selecting options from the PL and CL lookup columns. I modified the lookups to require the columns contain information.

Problem:
The CL column contains duplicate entries after selecting “Yes” to require that this column contains information. When the PL is “Yes” and the CL is “No”, all is well. When both are “Yes” I receive duplicate options in the CL. My CL is a small list and does not contain duplicates.

Please advise.
Apr 5, 2013 at 3:58 PM
I compared document library one’s implementation (DL1) to document library 2’s implementation (DL2) and may have located the cause of my problem.

DL2 functions properly when both PL and CL are set to “Yes” to require the columns to contain information.

Difference:
DL2 has the code embedded in the CEWP while DL1 has the CEWP linked to a text file with the code in the text file.

I copied the code from the text file into the CEWP of DL1 and set both PL and CL to “Yes”. No duplicates.

Interesting indeed.
Coordinator
Apr 5, 2013 at 4:33 PM
Not sure what's going on there. The duplication should only happen if you have duplicate values in the relationshipLists.

In general, it's far better to store your script in as file and reference it with the Content Link in the CEWP.

M.