OK – first blog post in literally years, so bear with me!
I came across this issue in SharePoint Online last week, and I was able to reproduce it in 2 tenants. Microsoft support were also able to reproduce it in a 3rd tenant.
Note: This issue seems to only affect lists / libraries created before approx. late August 2016 – it does not occur for a list / library created after that time.
You have a list or library with a choice column, where one or more of the choices contain an apostrophe.
In the example below, I created a column named ‘choice’, with a type of Choice (imagination isn’t my strong point).
I entered a single choice value of “Mother’s day”.
A view on the list / library is configured to to show only items where the choice column value is one that contains an apostrophe.
Note: I used ‘is equal to’ – but ‘contains’ shows the same behaviour.
One or more items in the list / library are configured with a value for the choice column that contains an apostrophe.
No items are shown in the view – despite there being valid items for that view.
Note: Other views filtering on the same choice column, but for values without apostrophes, work fine – e.g. “Easter”.
What Microsoft said
I raised a support case, and spoke at length with a very helpful engineer.
We determined that the issue was not reproducible on a newly created list / library in his test tenant, or in my tenant.
We then saved my list (which was created in early 2016) as a template (including content) – and deployed a new list from that template.
Using the new list (from template) we could still reproduce the issue.
The engineer then configured an existing list (created in early August 2016) in his tenant, in which he was able to reproduce the issue.
This confirmed that the issue was resolved around the end of August 2016, but pre-existing lists would continue to have the issue – even if a choice column was added now.
We also noted that it only affects choice columns, and only values in them with apostrophes – e.g. a text column is fine, and a choice column value without an apostrophe is also fine.
I took the easy way out – I simply removed the apostrophes from the choices.
An alternative would be to create a new list / library and migrate items to it.
Note: Just creating a new choice column in the existing list / library isn’t enough – you have to create a new list / library.