Cascade Dropdown not working

Feb 19, 2014 at 8:06 PM
I have 2 lists.
  1. Products - Title column is a list of products
  2. Types - 2 columns. Title is the type of Products and Product is a look column pointing to the Products list.
I am working on a picture library and have added two lookup columns.
  1. Product Category - Lookup folumn from Products.
  2. Product Sub Category - Lookup column pointing to the Title column of Types.
Here is my code.
<script language="javascript" src="/jQueryLibraries/jquery-1.7.2.js" type="text/javascript"></script>
<script language="javascript" src="/jQueryLibraries/jquery.SPServices-2013.02a.min.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
                    $(document).ready(function() {
                          $().SPServices.SPCascadeDropdowns({
                                       relationshipList: "{1ACCE6FE-F79F-493E%2DBFED-CB94CDE7F7C4}",
                                       relationshipListParentColumn: "Product",
                                       relationshipListChildColumn: "Title",
                                       parentColumn: "Product Category",
                                       childColumn: "Product Sub Category",
                                       debug: true
                             });
                    });
</script>
If I change something, like parentColumn, to a wrong column I get an error. However the second dropdown only displays "none" when I select a Product Category. There are values in the lookup lists that correspond to each Product Category.

Can anyone see what I am missing? I have been puling my hair out over this.

Thank You,
Michael
Coordinator
Feb 19, 2014 at 8:23 PM
What version of SharePoint and SPServices are you running?

Have you read this post?
http://sympmarc.com/2014/01/23/office-365-update-changes-display-name-on-required-fields/

2014.01, which I just released today, has a fix for this issue.

M.
Feb 19, 2014 at 11:06 PM

Thank you for the reply Mark. I am running SharePoint 2013 and SPServices 2013.02.

I have used this solution several times on SP2010 sites. I have run into problems with the relationshipListParentColumn had a space and I had to use the static name. This time both relationshipList columns are one word, no Space.

I believe that the Parent and Child column names are working fine. I tested by entering the wrong column name and I get the debug window. When the column name is correct the 2nd dropdown says none. When I click on it there is no other option.


Michael Montoya | Consultant
Apple Certified Associate
Dataworks Consulting, Inc | 7243 129th AVE SE | Newcastle, WA 98056
Tel: 425.687.6185 |
www.dataworksconsulting.com

Coordinator
Feb 20, 2014 at 3:59 AM
Try 2014.01 and see if you still have problems. (Are you using 2013 on Office365 or on prem? Are Product Category or Product Sub Category required?)

The other thing to check is that the relationships are stored in the list correctly. You've used this before, so I expect you know how to set it up.

relationshipListParentColumn and relationshipListChildColumn have to be the StaticNames.

M.
Mar 12, 2014 at 12:08 AM

Marc,

I tried the 2014.01 version and still have the problem. I am using 2013 on prem.

The fields were not required. I tried making them required and it still isn't working but has a different behavior. Instead of listing (none) in each box the product category is defaulted to the first option, the product sub category is blank.

I am pretty sure that the relationship is setup correctly. I have Products which is equivalent to countries in your example. Then I have types which is equivalent to Regions in your example. THe second field in Types is a lookup on the products field.

Thanks for your help


Michael Montoya | Consultant
Apple Certified Associate
Dataworks Consulting, Inc | 7243 129th AVE SE | Newcastle, WA 98056
Tel: 425.687.6185 |
www.dataworksconsulting.com