This project has moved and is read-only. For the latest updates, please go here.

CAML Query not working properly in SPDisplayRelatedInfo

Jun 13, 2012 at 2:26 PM

Hi All,


I am new to jquery services . I am facing issue when i filter the records with CAML query . Basically i have two columns system and unit, i want to so information based on them. Right now i am able to show information only based on unit  which returns more than 1 record. But i want to filter the record with value of system as well. Here both system and unit are look up columns. Please find the code below and let me know where i am wrong


  columnName: "Unit",
  relatedList: "{78D94735-3F63-434B-88C7-80C2CADA2C17}",
  relatedListColumn: "Title",
  relatedColumns: ["Super_x0020_User"],
CAMLQuery:"<Eq><FieldRef Name='system'/><Value Type='Text'>"+$("select[title=System]").children("option:selected").text()+"</Value></Eq>"
    displayFormat: "list",


P. S it is working fine in edit mode of page when i assign the CAML query to variable .

Please help


Thanks in advance


Jun 13, 2012 at 9:47 PM


It's not totally clear what you are after, but the CAMLquery for SPDisplayRelated services isn't set up to be dynamic. Instead, the same query is ANDed with the query that SPServices does to get the right info. Let me know if the docs don't make this clear.


Jun 14, 2012 at 7:57 AM

Hi Marc,


Sorry for not being clear . My requirement is to display User Information based on two fields Unit & System. Actually System and Unit are cascading dropdowns. Through SPdisplayrelated info i am able to  filter based on only one column so i used the CAML Query to apply further filter. I couldnt hard code the value in CAML Query as it is a dynamic value. If i cant set dynamic value in CAML Query , Please let me know different way to achieve this