Tag Info

New answers tagged


So you basically want to load the content of a second list into a HTML Select-Field in your edit form of the first list? Try to avoid hard code DOM ids. I would prefer using REST and jQuery. And it's better to completely re-build up a select field than trying to alter it: $.ajax({ url: ...


Use alert(data.d) instead of alert(data.d.results). _api/web/lists/GetByTitle('Features')/getitembyid('"+$id+"') Above endpoint means, you are requesting for a single item. For multiple items, endpoint will be _api/web/lists/GetByTitle('Features')/Items And items will be in data.results. Difference: data.results is for multiple items data.d is for ...


$.ajax({ url: _spPageContextInfo.webAbsoluteUrl+"/_api/Web/Lists/GetByTitle('Features')/GetItemById(2)", type: "GET", headers: { "accept": "application/json;odata=verbose", }, success: function (data) { console.log(data.d); }, error: function (error) { alert(JSON.stringify(error)); } });


var query = '<View><Query><Where><Eq><FieldRef Name="Title" /><Value Type="Text">Country</Value></Eq></Where></Query></View>'; Your CAML query and end-point seems that your are trying to get some fields where Title equals Country. If it is your main requirement, then just make a GET request ...

Top 50 recent answers are included