We have Name field on account which is encrypted. (PersonAccount)
Now as this field is encrypted we cannot fire a Like query as a partial match. So we created a formula field and copy the FirstName and LastNameand fire a query on this formula field.
When I fire a SOQL query SELECT Id, Name_Formula__c FROM Account Where Name_Formula__c LIKE '%test%' it throws an error Name_Formula__c can not be filtered in a query call.
I tried in my local org where Name is not encrypted, there the same filter query on Name_Formula__c works fine.
Is there any limitation from shield that we cannot keep a formula field on where clause as LIKE query when the formula field derives data from an encrypted field?