I am new to SPServices, I am trying to fetch list items from a list.
I am fetching the Title and a person field(Created By).
When i print the Created By field ,I get the person name say XYZ.
But i want to get his ID i.e DOMAIN\NO.
How can i achieve this? This is my code:
$().SPServices({
operation: "GetListItems",
async: false,
listName: "AppreciationList",
CAMLViewFields: "<ViewFields><FieldRef Name='Title' /><FieldRef Name='Appreciated_x0020_Person'/><FieldRef Name='Author'/></ViewFields>",
completefunc: function (xData, Status) {
$(xData.responseXML).SPFilterNode("z:row").each(function () {
alert($(this).attr("ows_Appreciated_x0020_Person")+ $(this).attr("ows_Title"));
});
}
});