0

So I'm sending a REST query like:

_api/web/lists/GetByTitle('List')/getitems?$select=AuthorId

It works fine, I see 49 records with AuthorId. Now I want to filter by this column. Then I want to filter this list by AuthorId field:

_api/web/lists/GetByTitle('List')/getitems?$select=AuthorId&$filter=AuthorId eq <id>

But I got error:

error: {code: "-2147024809, System.ArgumentException"}
value: "Column 'AuthorId' does not exist. It may have been deleted by another user.

I don't get this error when I change query for something like this:

_api/web/lists/GetByTitle('List')/getitems?$select=AuthorId&$filter=Author eq <id>

But I also have no results for this, and I should.

I don't know If it is important information but my list is a library also.

I saw a lot of posts about this problem but none of it worked for me.

Is there any way to do this or any documentation information why it is so messed up?

0

Try using this:

<siteUrl>/_api/web/lists/getbytitle('List')/items?$select=Title,Author/Id&$expand=Author&$filter=Author/Id eq <id>

Microsoft official documentations:

  1. Complete basic operations using SharePoint REST endpoints
  2. Working with lists and list items with REST
  3. Working with folders and files with REST
1
  • Hi @Iwoo, Does this answers your question? If Yes, Please Upvote(^) and accept as an Answer as it will help others with same problem in future. It also removes this question from "Unanswered questions" list. If you have any doubt please ask here. – Ganesh Sanap Nov 24 '20 at 15:44

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.