function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Jude Morin 3Jude Morin 3 

Roll-up Summary filtered by field on Master Record

I want to count the number of child records that were created within 90 days of the master record begin date. Is there a way to pass a Master Record variable to the filter of the roll-up summary? Or is there a more elegent way of getting this data? 
Andrew GAndrew G
Hi Jude

Whilst you can add Filter Criteria on the Rollup, you can dynamically test the parent record. (to my understanding).

so thinking aloud (untried method)
Create a formula date field on the child record which contains Parent.CreateDate
Create a fornula checkbox field on the child record which resolves to true if Created Date is < Parent.CreateDate+90days.  Something like:
CreatedDate - 90 < Parent.CreatedDate
Then on your rollup filter, filter by the second field being true.

Regards
Andrew