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

ows_Author or ows_Editor not returning data

May 22, 2013 at 5:20 PM
I am trying to get the created by from a SharePoint custom list. i am not sure what i an doing wrong. it return a row and i can get the ows_Title. Can someone help me. I have tried CAMLViewFields: "<ViewFields Properties='True' />", as well but no luck.
Here is the code.

<script src="" type="text/javascript"></script><!-- Reference SPServices on cdnjs (Cloudflare) --><script src="" type="text/javascript"></script>
        operation: "GetListItems",
        async: false,
        listName: "WikiComments",
        CAMLViewFields: "<ViewFields >" +
                    "<FieldRef Name='Created'></FieldRef>" +
                    "<FieldRef Name='ows_Author'></FieldRef>" +
                    "<FieldRef Name='ows_Editor'></FieldRef>" +
CAMLQuery: "<Query><Where><Eq><FieldRef Name='WikiID'/><Value Type='Text'>" + _spPageContextInfo["pageItemId"] + "</Value></Eq></Where></Query>",
            completefunc: function (xData, Status) {
            $(xData.responseXML).SPFilterNode("z:row").each(function() {
alert("Author: "+$(this).attr("ows_Author")+" Editor: "+$(this).attr("ows_Editor"));
liHtml = liHtml + "<li>" + $(this).attr("ows_Title") + "-------------"+ $(this).attr("ows_Author") +"</li>";

}); </script><div id="targetDIV" style="border-top: 1px; border-right: 1px; border-bottom: 1px; border-left: 1px"></div>
May 22, 2013 at 5:30 PM
got it,
here is what i had to do
CAMLViewFields: "<ViewFields Properties='True' />",
instead of
CAMLViewFields: "<ViewFields>" +
                    "<FieldRef Name='Title'></FieldRef>" +
                    "<FieldRef Name='Created'></FieldRef>" +
                    "<FieldRef Name='ows_Author'></FieldRef>" +
                    "<FieldRef Name='ows_Editor'></FieldRef>" +
May 22, 2013 at 6:08 PM
The names of columnsin the ViewFields shouldn't be preceded by "ows_".