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

CAMLQuery to User Information List

Dec 15, 2011 at 5:40 PM

Hi All,

Stuck in a rut here... I'm trying to pull the PictureURL from the User Information List, which works perfectly fine until I try to pull a specific picture using CAMLQuery. Here's what works (and borrowed heavily from examples)...

<script type="text/javascript" language="javascript" src="../jQuery/jquery-1.7.1.min.js"></script><script type="text/javascript" language="javascript" src="../jQuery/jquery.SPServices-0.7.0.min.js"></script>

<script language="javascript" type="text/javascript">

$(document).ready(function() {
    operation: "GetListItems",
    listName: "User Information List",
    CAMLViewFields: "<ViewFields><FieldRef Name='Picture' /></ViewFields>",
    completefunc: function (xData, Status) {
      $(xData.responseXML).find("z\\:row, row").each(function() {
        var picsrc = $(this).attr("ows_Picture").split(', ')[0];
        var liHtml = "<li>Picture: <img src='" + picsrc + "' width=45 height=55><br />name: " + $(this).attr("ows_Name") + "</li><br />";

<ul id="tasksUL"/>

Now what I want to add looks something like this...

CAMLQuery: "<Query><Where><Eq><FieldRef Name='Title' /><Value Type="Text">Doe, John</Value></Eq></Where></Query>", 

But as soon as I add that, I return no results.

Hoping it's something easy... thoughts?




Dec 15, 2011 at 5:50 PM

The word Text for value type should be in single quotes.

Dec 15, 2011 at 6:04 PM


Thank you SO much! :)