Hello,
I am applying conditions to a model with fairly basic filter grouping logic added and am receiving SOQL query errors. I have tried various parenthesis, reordering, removing and re-adding conditions. This seems to be a very problematic bug. You can see if you compare the screenshot to the SOQL it is not reading the conditions in the correct order at all. Any suggestions would be greatly appreciated.
Thanks,
Sarah
Grouping Logic:
1 AND 2 AND 3 AND (4 OR 5) AND 6 AND (7 OR 8)
I have attached screenshots of the 8 conditions.
Here is the error message I am receiving:
1: An error occurred while attempting to perform the following SOQL query: SELECT Site__c,Site__r.Name,Expected_Capacity__c,Begin_Date__c,End_Date__c,Site__r.Address_Line_1__c,Program__c,Zone__c,Site__r.Id,Registration__r.Registration_ID_f__c,Registration__r.Site__c,Registration__r.Site__r.Name,Registration__r.Site__r.Id,Registration__r.Site__r.Status__c,Registration__c,Registration__r.Name,Registration__r.Registration_Status__c,Name,Operator__c,Id FROM Capacity_History__c WHERE (Registration__r.Site__r.Id in (‘aA64v000000D2ixCAC’,‘aA64v000000D2iyCAC’,‘aA64v000000D2izCAC’,‘aA64v000000D2j0CAC’,‘aA64v000000D2j1CAC’,‘aA64v000000D2j2CAC’,‘aA64v000000D2j3CAC’,‘aA64v000000D2j4CAC’,‘aA64v000000D2j5CAC’,‘aA64v000000D2j6CAC’,‘aA64v000000D2j7CAC’,‘aA64v000000D2j8CAC’,‘aA64v000000D2j9CAC’,‘aA64v000000D2jACAS’,‘aA64v000000D2jBCAS’,‘aA64v000000D2jCCAS’,‘aA64v000000D2jDCAS’,‘aA64v000000D2jECAS’,‘aA64v000000D2jFCAS’,‘aA64v000000D2jGCAS’))AND(Registration__r.Registration_Status__c != ‘0. Retired’)AND(Program__c = ‘Emergency Load Response Program’)AND((Operator__c = ‘I&M’)OR(Begin_Date__c <= N_MONTHS_AGO:12))AND(End_Date__c >= N_MONTHS_AGO:12)AND((End_Date__c = null)OR8) ORDER BY Program__c, Zone__c, Site__c, Begin_Date__c ASC,Id Error:expecting a right parentheses, found ‘OR8’