1

In my org, I've set up some custom metadata on which I have all text fields which I am querying. On my query without anything in the where condition

SELECT Label,Fields__c,Labels__c,Scheme__c from ClickWrap_Sections__mdt 

I get, enter image description here

When I run the query as

SELECT Label, Fields__c, Labels__c, Scheme__c from ClickWrap_Sections__mdt where Scheme__c=null OR Scheme__c like '%PL%'

It returns me only the list of records that have Scheme__c set to null enter image description here

Again, if I remove the null check and run the query as just

SELECT Label, Fields__c, Labels__c, Scheme__c from ClickWrap_Sections__mdt where Scheme__c like '%PL%'

It returns me the two records that match the criteria enter image description here

I would like to understand how can I get the records that have Scheme__cas null or match a particular criteria in the same query and why the first query doesn't work.

3

0

You must log in to answer this question.

Browse other questions tagged .