0

So, I am messing with my REST queries again, and was having some of these random errors. After some testing, it was determined that it appears that whenever a filter was applied to the title field, the filter will then refuse to work. Is there something that I missed that I will need to treat the title field any differently than other columns? It also seems like some other single-line-of-text columns are generating errors. So what determines whether if a column can be filtered or not?

As an example, I have been testing on the filter only, and doing statements as below over and over again on different combinations. It seems to me that some columns just plain doesn't work, and some just do not. All the columns I have issues with are single line of texts, that return an error 403. The columns that do not work with filtering included the ones that is being displayed in the result set when other columns are filtered, which seems to indicate that this is related to the filter function, but I am not entirely sure.

$filter=FIELD1 eq 'XXX'
$filter=FIELD2 eq 'YYY'

0

Please add filter column on selected column on REST API

Like as show in below example

?$select=FIELD1,FIELD2&$filter=(FIELD1 eq 'XXX') and (FIELD2 eq 'YYY')
  • Tested with error 400 instead of 403. Did not work. – Isa Feb 6 '18 at 7:45
  • Actual statement: .../getbytitle('TABLENAME')/items?$select=COL1, COL2&$filter=COL1 eq 'XXX' – Isa Feb 6 '18 at 7:47
  • Then it should be work. Can you provide more details like SP version and any other stuff that you used on call – Bharat Khunti Feb 6 '18 at 10:05
  • This is a site hosted on Sharepoint Online. Tests were ran on multiple Chrome versions. I have not yet tested in Firefox, but given the 403 error, I am not sure if that is the problem. I just thought of one thing though, the dev test site is actually set up as a subsite of the prod site, but we are actually running a REST query on the prod data on the master site - maybe that is the issue? Let me make some changes and see if moving it to the master site works. – Isa Feb 6 '18 at 19:21
  • ... Ok, I found the problem!!! Apparently, one of the columns I am trying to filter is the Title column, and even though the name has been changed, the query apparently still needs to stay "Title" in order for it to work... Thanks Sharepoint... XD But I still have problems with some other calculated columns. – Isa Feb 7 '18 at 23:42

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.