Count associated records created within a time period
SOLVE
I have a custom object that logs specific contact activities.
I'd like to have a property on the contact record that looks at the 'type' property on the associated custom object records and the create date, and then returns a count of the associated records from the past X days.
So if a contact had 3 associated records: Record 1 | Type=Parent | Create date=2024-08-01 Record 2 | Type=Child | Create date=2024-08-01
Record 3 | Type=Parent | Create date=2023-08-01
Then a contact property for 'Parent records created past 90 days' would return a '1'.
Any suggestions on how to build this? The count seems doable, but I can't see a way to limit it to records from the last 90 days.
This would require an assisting custom object property that is set to 'Yes' when the record falls into the desired date range. Once you have this assisting property, you can add it as a condition in the contact calculation property that counts the associated custom object records.
If you have a today's date property, this assisting property could be a boolean calculation property that checks whether the duration between the create date and today is less than X days.
Without a today's date property, this is probably most easily set up using a custom object workflow that sets the value of a checkbox property on the custom object to 'Yes' upon creation of the custom object record, then delays for X days, then sets the value to 'No' or clears it.
Best regards!
Karsten Köhler HubSpot Freelancer | RevOps & CRM Consultant | Community Hall of Famer
This would require an assisting custom object property that is set to 'Yes' when the record falls into the desired date range. Once you have this assisting property, you can add it as a condition in the contact calculation property that counts the associated custom object records.
If you have a today's date property, this assisting property could be a boolean calculation property that checks whether the duration between the create date and today is less than X days.
Without a today's date property, this is probably most easily set up using a custom object workflow that sets the value of a checkbox property on the custom object to 'Yes' upon creation of the custom object record, then delays for X days, then sets the value to 'No' or clears it.
Best regards!
Karsten Köhler HubSpot Freelancer | RevOps & CRM Consultant | Community Hall of Famer