AnsweredAssumed Answered

Nintex Forms SPServices to Connect to list on another site

Question asked by b_dheeraj on Jan 8, 2018
Latest reply on Jan 8, 2018 by emha

Hi All, I need to use this SP Services and Jquery autocomplete function fetch a data from a list called "myCityList" and populate the list data in a text field in an autocomplete fashion. The Challenge here is that now i need to connect to a "myCityList" which is on another site. Is there a way to connect to lists of different sites by using SP Services?

 

Any help is appreciated.

 

Below is the autocomplete code that i'm using:

 

var itemSource = [];
NWF$(document).ready(function () {
NWF$().SPServices({
operation: "GetListItems",
async: true,
listName: "myCityList",
CAMLQuery: '<Query><OrderBy><FieldRef Name=\'City\' Ascending=\'True\' /></OrderBy></Query>',
CAMLViewFields: '<ViewFields><FieldRef Name=\'City\' /></ViewFields>',
completefunc: function (xData, Status) {
NWF$(xData.responseXML).SPFilterNode("z:row").each(function () {
itemSource.push(NWF$(this).attr("ows_City"));
});
}
});
NWF$("#" + myCity).autocomplete({
source: itemSource
});
});

Outcomes