I'm trying to get information from a list in a custom SPField called "My Field" with the internal name "MyField" using this JavaScript code:
$.ajax({
url: "http://<URL>/_api/web/lists/GetByTitle('Documents')/items?$select=MyField",
type: "GET",
headers: {
"accept": "application/json;odata=verbose",
},
success: function(data){
$.each(data.d.results, function (key, value) {
console.log(value.MyField);
});
},
error: function(error){
console.warn(JSON.stringify(error));
}
});
MyField has a custom field value type.
I found this description
Not all types of column are available via REST, most annoyingly managed metadata columns are amongst this group of unsupported column types. Further, not all types of column will return data for an entry just by including them in the $select parameter, an example of which is Lookup (single or multi-value) columns. ...
Is this still the case, and what do I have to implement in the custom SPField, to make it retrievable via REST ...
Any ideas what I'm doing wrong?
undefined
for all items and there is also noMyField
member if I expand thevalue
-objects ... also adding?$select=*
is not solving the issue...