4

I am trying to query a simple multiple lines of text column on a custom list in SharePoint 2013 on-prem. Whenever I include the text column in the $select fields I get an error that the field is not valid.

I found another person who is having the same issue but there were no replies to their post. Multiple lines of text not accessible in $select/$expand query : Sharepoint 2013

I would rather not have to use listdata.svc and would rather not have to make another round trip just for one field. Any ideas would be greatly appreciated.

Edit The error is the same as the other post.

The query to field '[MyList]/[MyField]' is not valid.

Here is the REST query. The reason I am using $expand is because I am querying off a lookup field on MyParentList that points to MyChildList.

This generates the error above:

/_api/web/lists/getByTitle('[MyParentList]')/items(1)?$select=Id,Title,Introduction,[LookupField]/Id,[LookupField]/[MultilineTextField]&$expand=[LookupField]

This does not:

/_api/web/lists/getByTitle('[MyParentList]')/items(1)?$select=Id,Title,Introduction,[LookupField]/Id&$expand=[LookupField]

I am actually querying a bunch of other fields, all single line of text, and they work fine. I truncated the queries for readability. I can guarantee you with 100% certainty I am not using an invalid field name.

  • What field are you trying to get the text from? Is it an OOTB field or custom? – Jordan Jan 12 '15 at 17:05
  • Post the error message. – Amal Hashim Jan 12 '15 at 18:23
  • Its a custom field defined in a list instance schema.xml that is deployed via a sandboxed WSP. It's pretty simple. – Lane Goolsby Jan 12 '15 at 18:24
  • I haven't had any problems querying a multiple line of text field before. You shouldn't need to expand on it like the other post says. I was asking what kind of field it was to figure out if you are using the correct internal column name. Can you verify that? – Jordan Jan 12 '15 at 18:42
  • Can you post your REST query? As @Jordan mentioned, $expand is not necessary for multi lines of text. – wjervis Jan 12 '15 at 18:59
0

I get the same behavior in SharePoint Online right now, so it appears that it is what it is. I can expand and select a single line text field, but I get a 400 Bad Request when I try to select a multi line text field, with the same message you're getting:

"The query to field 'LU/Multi' is not valid."

  • I edited my response, because my first response was just wrong ;) – Joe McShea Feb 15 at 14:43

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.