It looks like a scoping issue. You need to declare the variable outside the SPServices call. Something like this:
M.
var actualStringTitle;
$().SPServices({
operation: "GetListItems",
async: false,
listName: "Assigned Resource Progress Tracker",
CAMLViewFields: "<ViewFields><FieldRef Name='Title' /><FieldRef Name='stringTitle' /></ViewFields>",
CAMLQuery: "<Query><Where><Eq><FieldRef Name='stringTitle' /><Value Type='text'>"+concatstringTitle+"</Value></Eq></Where></Query>",
completefunc: function (xData, Status) {
$(xData.responseXML).SPFilterNode("z:row").each(function() {
actualStringTitle = $(this).attr("ows_stringTitle");
});
}
});
alert(actualStringTitle);
However, you're looping through the items, so this would alert the last value. It sounds like you want to do something more like: $().SPServices({
operation: "GetListItems",
async: false,
listName: "Assigned Resource Progress Tracker",
CAMLViewFields: "<ViewFields><FieldRef Name='Title' /><FieldRef Name='stringTitle' /></ViewFields>",
CAMLQuery: "<Query><Where><Eq><FieldRef Name='stringTitle' /><Value Type='text'>"+concatstringTitle+"</Value></Eq></Where></Query>",
completefunc: function (xData, Status) {
$(xData.responseXML).SPFilterNode("z:row").each(function() {
var actualStringTitle = $(this).attr("ows_stringTitle");
alert(actualStringTitle);
});
}
});
This will alert every actualStringTitle from the returned list items.M.