SPDisplayRelatedInfo combined with SPCascadeDropdowns not working

Oct 16, 2009 at 10:02 PM
Edited Oct 16, 2009 at 10:06 PM

I'm trying to implement both functionalities in the same field: SPDisplayRelatedInfo combined with SPCascadeDropdowns

This does not work for some reason. I get the related Info shown up, but then the lookup field is no longer filtered.

Is this 'works as designed', is this a known issue, or do you have a workaround for me?

Here my code from the NewForm.aspx:

<asp:Content ContentPlaceHolderId="PlaceHolderAdditionalPageHead" runat="server">

 <script language="javascript" type="text/javascript" src="/_layouts/jQuery/jquery-1.3.2.js"></script>
 <script language="javascript" type="text/javascript" src="/_layouts/jQuery/jquery.SPServices-0.3.2.js"></script>
 <script language="javascript" type="text/javascript">
  $(document).ready(function() {
 
   $().SPServices.SPDisplayRelatedInfo({ 
     columnName: "Company",  // The display name of the parent in the form
     relatedList: "Companies",  
     relatedListColumn: "Title", 
     relatedColumns: ["WorkAddress","WorkZip","OtherAddressStreet","OtherAddressPostalCode", "WorkCity"], 
     displayFormat: "table"
     // headerCSSClass: "ms-vh2", // [Optional] CSS class for the table headers
     // rowCSSClass: "ms-vb" // [Optional] CSS class for the table rows
   });


 // dependent dropdowns Region - Country - Company
    $().SPServices.SPCascadeDropdowns({
    relationshipList: "Countries",
    relationshipListParentColumn: "Region",
    relationshipListChildColumn: "Title",      
    parentColumn: "Region",
    childColumn: "Country"
   });
   $().SPServices.SPCascadeDropdowns({
    relationshipList: "Companies",
    relationshipListParentColumn: "lkp_Country",
    relationshipListChildColumn: "Title",
    parentColumn: "Country",
    childColumn: "Company"
   }); 
 
  });

 

Coordinator
Oct 17, 2009 at 2:26 AM

ismailia:

This ought to work, and your code looks OK.  I've tested combinations of the two functions in various orders and they should play nicely together.

Do you get any errors? Are your lists in the same site as your forms? If you remove the SPDisplayRelatedInfo call, do the cascading dropdowns then work?

It may take a few posts back and forth, but we should be able to get this running for you.

M.

Nov 3, 2010 at 4:21 PM

Hi,

I am not able to get these to functions to work together either.  I am able to use them seperately.  When they are on the same page (the same CEWP) the functionality works until the user hits the OK button. 

Code:

<script language="javascript" type="text/javascript" src="**removed**/jQuery%20Core/jquery-1.4.2.min.js"></script>
<script language="javascript" type="text/javascript" src="**removed**/SPServices/jquery.SPServices-0.5.7.min.js"></script>
<script language="javascript" type="text/javascript">
 $(document).ready(function() {
  $().SPServices.SPCascadeDropdowns({
   relationshipWebURL: "**removed**",
   relationshipList: "**removed**",
   relationshipListParentColumn: "Business_x0020_Unit",
   relationshipListChildColumn: "Title",
   parentColumn: "Business Unit",
   childColumn: "Department",
   debug: true
  });
  $().SPServices.SPDisplayRelatedInfo({ 
   columnName: "Job Level",
   //relatedWebURL: "",
   relatedList: "**removed**",
   relatedListColumn: "Title",
   relatedColumns: ["Title", "FLSA_x0020_Exemption_x0020_Statu", "Pay_x0020_Grade", "Min_x0020_Req_x0020_Experience", "Min_x0020_Req_x0020_Education"],
   displayFormat: "table",
   headerCSSClass: "ms-vh2",
   rowCSSClass: "ms-vb2",
   numChars: 0,
   matchType: "Eq",
   //CAMLQuery: "",
   completefunc: null,
     debug: true
  });
 });
</script>

Upon hitting the OK button the user gets the standard error message: 

Server Error in '/' Application.

The resource cannot be found.

 

Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly.

Requested URL: /_layouts/error.aspx

  

 

Coordinator
Nov 3, 2010 at 6:02 PM

Scott:

These two functions ought to work just fine together, so there's probably something wrong with the way you are calling them. If they work OK separately, then I'm not sure what the issue is. Why don't you start a new thread for this and give some more specifics.

M.