0

I'm using SPServices to get list items. I'm having difficulty getting the value for my workflow status column as it keeps coming back undefined. I am using the internal name so not sure why it would come back undefined? There are values in the column. I know that SP stores the Workflow Status value as an integer. Also, this is a Nintex Workflow not Designer if that makes a difference. See code below:

$()SPServices({
operation: "GetListItems",
async: false,
CAMLViewFields: "<ViewFields><FieldRef Name='docLink' /></ViewFields>",
list name: "Program",
debug: true,
completefunc: function (xData, Status) {
   $(xData.responseXML).SPFilterNode("z:row").each(function(){
     console.log($(this).attr("ows_docLink0"));
});
}
});
  • Specify your Status column in viewfields to retrieve it's value – Akshay Randive Jul 27 '18 at 16:47
  • Hi @AkshayRandive. Thank you so much for replying. My status column is specified in ViewFields.. it is 'docLink'. Should I be specifying additional fields, such as an ID? – user2004758 Jul 27 '18 at 17:28
  • You can simply log response object in console and check what data you get – Akshay Randive Jul 27 '18 at 17:35
  • It just posts the document context... checked the innerHTML node & i don't see the column listed at all... – user2004758 Jul 27 '18 at 17:49
  • To anyone else reading, the reason this isn't working is because SP 2013 uses a different Workflow Engine and the Workflow Status field is saved as a Hyperlink/URL value. Currently searching to see how to query a Hyperlink field with SPServices for 2013 [though I suspect making a REST call is the easiest approach]. – user2004758 Jul 31 '18 at 12:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.