SPCascadeDropdowns

Jun 23, 2011 at 5:00 PM

Having an issue with the SPCascadeDropdowns not updating the second dropdown.

I turned on debug and I am not getting any pop-ups or error messages.  I believe that I have the relationship lists all setup correctly.  Any hints?

Here is my js...

<script src="/**/**/Javascript/utilities/jquery.SPServices.min.js"
type="text/javascript"></script>
<script language="javascript" type="text/javascript">
   $(document).ready(function() {
      $().SPServices.SPCascadeDropdowns({
         relationshipWebURL: "http://**/**/**/",
            // URL of site, full or relative; full more reliable
         relationshipList: "Market - Vehicle Number Relationship",
            // 'Display Name' of relationship list
         relationshipListParentColumn: "ARIMarket",
            // 'Static Name' of column
         relationshipListChildColumn: "ARIVehicleNumbers",
            // 'Static Name' of column
         parentColumn: "ARIMarket",
            // 'Display Name' of column in working list
         childColumn: "ARIVehicleNumbers",
            // 'Display Name' of column in working list

debug: true


      });
   });
</script>

I added the **'s in to hide some specific business information.  Please help!

Thanks,

Jim

Coordinator
Jun 23, 2011 at 6:01 PM

Jim:

Are you referencing jQuery itself? I don't see that script reference in what you show above.

M.

Jun 23, 2011 at 6:04 PM

Sorry Marc,

 

I forgot to mentioned that it is called higher up on the page not in the CEWP that I have this code in.  If I input an incorrect name for the relationshipList I do get the error message that pops up with debug.

 

Thanks,

Jim

Coordinator
Jun 23, 2011 at 6:06 PM

OK, well what you show as code seems right. What does the data in the "Market - Vehicle Number Relationship" list look like?

M.

Jun 23, 2011 at 6:10 PM

See below

ARIMarket          ARIVehicleNumbers

CLV	             20564-abcdef123456789
COL	             20564-abcdef12345678911
KSC	             20564-abcdef12345678913
SEA	             20564-abcdef12345678912
NYC	             20555-abcdef12345678955
NYC	             20556-abcdef12345678956
	

Thanks!

Coordinator
Jun 23, 2011 at 6:16 PM

Is
  relationshipListChildColumn: "ARIVehicleNumbers",
really the Title column, or is it a different column called "ARIVehicleNumbers"?

And is
  relationshipListParentColumn: "ARIMarket"
a Lookup column to the same list as
  parentColumn: "ARIMarket"
?

M.

Jun 23, 2011 at 6:21 PM

I have 3 lists total:

ARIMarket

  Title column contains the ARIMarket info you see above (lookup for Market - Vehicle Relationship)

 

ARIVehicleNumbers

  Title column contains the ARIVehicleNumbers info you see above (lookup for Market - Vehicle Relationship)

 

Market - Vehicle Relationship

  Title column is blank

  ARIMarket - lookup to list ARIMarket

  ARIVehicleNumbers - lookup to list ARIVehicleNumbers

 

I hope this helps.

Coordinator
Jun 23, 2011 at 6:40 PM

I think the problem is that you only should have two lists out of the three above:

ARIMarket

  Title column contains the ARIMarket info you see above (lookup for Market - Vehicle Relationship) 

ARIVehicleNumbers

  Title column contains the ARIVehicleNumbers info you see above (lookup for Market - Vehicle Relationship)
  ARIMarket column containing the ARIMarket this ARIVehicleNumber belongs to (lookup into ARIMarket.Title)

Then your code will be:

<script src="/**/**/Javascript/utilities/jquery.SPServices.min.js"
type="text/javascript"></script>
<script language="javascript" type="text/javascript">
   $(document).ready(function() {
      $().SPServices.SPCascadeDropdowns({
         relationshipWebURL: "http://**/**/**/",
            // URL of site, full or relative; full more reliable
         relationshipList: "ARIVehicleNumbers",
            // 'Display Name' of relationship list
         relationshipListParentColumn: "ARIMarket",
            // 'Static Name' of column
         relationshipListChildColumn: "Title",
            // 'Static Name' of column
         parentColumn: "ARIMarket",
            // 'Display Name' of column in working list
         childColumn: "ARIVehicleNumbers",
            // 'Display Name' of column in working list

debug: true


      });
   });
</script>
Jun 23, 2011 at 7:49 PM

I am still getting the same issue.  I can choose "ARIMarket" and it always says "Choose ARIVehicleNumbers..."

The ARIVehicleNumbers list has the the vehicle number in the Title and has the ARIMarket in a lookup column called ARIMarket.

 

Hmmm, I am puzzled.

Coordinator
Jun 23, 2011 at 7:56 PM

Take a look back through the Country/Region/State/City example in the docs. Maybe there's something else we're missing?

M.

Jun 23, 2011 at 8:40 PM

Well I tried one other easy thing and it appears like it was the issue.  I was using version 0.5.8 of the SPServices.  I updated to 0.6.2 and it appears to be working now.  WooHoo!  Thanks for all of your help Marc!

Coordinator
Jun 24, 2011 at 12:40 PM

Excellent.

One of the problems with naming your files something consistent like jquery.SPServices.min.js is that I can't tell what version you have. I didn't think to ask. You probably are using a version of jQuery newer than 1.5, which would have caused problems. The jQuery folks manage to break something in my code with just about every point release. It's not that I'm doing anything unacceptable, but they change the rules. Backward compatibility isn't their strong suit, IMO.

M.