+ Start a Discussion
Frederik BootFrederik Boot 

Roll-Up summary with condition on date field

Hello,

In our SF environment, I would like to create a roll-up summary field with a condition on a date field. However, it seems like relative date filters are not allowed. See screenshot below. It there another way to achieve this.

Screenshot
 
Best Answer chosen by Frederik Boot
pkpnairpkpnair
Use Process builder -> (every time created or changed)-> to call a flow.|
Builf a small flow: To the flow, you can pass the parent record ID as an input parameter.  Do a fast look up for the child record filtering on the input parent record id. Also apply all your filters on the selection. Then loop over it, count and assign this value to a roll up on the parent record. 

All Answers

pkpnairpkpnair
Frederik,
Did you try creaeting a formula field to store TODAY() and then use it here?

-Prakash
Frederik BootFrederik Boot
Hi Prakash,

Thanks you your reply! Just tried to create a formula field which stores TODAY(). This does not work, because in the filter criteria I cannot select a field. Also tried Today__c (field name) as a value, but this doesn't work either.
pkpnairpkpnair
It would be easy to do this with a visualworkflow.
Frederik BootFrederik Boot
I am familiar with concepts of Visual Workflows. However, I don't understand how the flow will be triggered in this case. Using a process builder is not an option, because the child records are not edited.
pkpnairpkpnair
Use Process builder -> (every time created or changed)-> to call a flow.|
Builf a small flow: To the flow, you can pass the parent record ID as an input parameter.  Do a fast look up for the child record filtering on the input parent record id. Also apply all your filters on the selection. Then loop over it, count and assign this value to a roll up on the parent record. 
This was selected as the best answer