0

I have a little Problem. I'm trying to do the following. There is a Field on SharePoint List items called HasUniqueRoleAssignments that is hidden on a standard REST call. If I put it in the select string of the rest call I will retrieve it. So far so good. But what I apperently can't do is use it in the filter statement. So the URL

.../sites/site/_api/web/lists/getbytitle('Listname')/items?$filter=(Some_Standard_Field%20eq%20%27139%27)&$select=Id,HasUniqueRoleAssignments,Author/Title,Editor/Title,Created,Some_Standard_FieldId&$expand=Author,Editor&$top=1000

will work just fine. But if I try

.../sites/site/_api/web/lists/getbytitle('Listname')/items?$filter=(HasUniqueRoleAssignments%20eq%20%27false%27)&$select=Id,HasUniqueRoleAssignments&$top=1000

the request will fail with the error message, that the column HasUniqueRoleAssignments is not available.

Does anyone have an idea, how to use the filter to get items with

HasUniqueRoleAssignments = false or true?

Would be thankful for help

0

Try to use this endpoint:

.../sites/site/_api/web/lists/getbytitle('Listname')/items?$select=Id,HasUniqueRoleAssignments&$filter=HasUniqueRoleAssignments eq 0&$top=1000

?

Filtering a boolean field with 'false' means a string.

If you want filter true use: eq 1 instead of eq 'false'.

And false use: eq 0 instead of eq 'true'.

  • sadly that doesn't work. The problem doesn't seem to be the value I'm filtering but the Column. SharePoint tells me that it doesn't exist even though it obviously does – relief.melone Nov 28 '17 at 20:57

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.