I would like to have DLRS run a count on child records through a lookup. The where clause for counting is to compare a DATE field on the Lookup Parent to a Date/Time field on the Lookup Child.

My Where clause is written as follows:

CustomObjectParent__c.Datefield__c = (DATEVALUE(CustomObjectChild__c.Date_time__c))

It does not allow it and provides the following error:

Error: Relationship Criteria 'CustomObjectParent__c.Datefield__c = (DATEVALUE(CustomObjectChild__c.Date_time__c))' is not valid, see SOQL documentation http://www.salesforce.com/us/developer/docs/soql_sosl/Content/sforce_api_calls_soql_select_conditionexpression.htm, error is 'expecting a colon, found '(''

Can I only use EQUALS with a field and an argument? eg FIELD__c = 25.

How else can I get the answer I need so that the DLRS roll-up summary only chooses children with a date/time field of the same date as the parent date field?

1 Answer 1


SOQL doesn't currently support comparing two fields, but it's coming soon (Safe Harbor applies). For now, if you want something like that to work, you need to create a custom formula, such as:

Same Parent Date (Checkbox) =
  SomeDate__c = Parent__r.SomeDate__c

And from there, in DLRS, you would say something like:

Same_Parent_Date__c = true
  • Perhaps worth noting that this particular DLRS rollup will not work in Realtime mode and has to be run Scheduled.
    – David Reed
    Oct 4, 2018 at 15:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .