Workflow Filters based on ALL associated Child Companies and not just ANY

I am trying to create a filter criteria in a workflow to be based on if ALL associated child companies are at a certain property, and not just if ANY child companies meet the criteria. From what I have found this is not an option, but I found the following feedback “If you need true “ALL children meet X” logic, you’d typically approximate it with extra properties and one or more supporting workflows (for example, tracking flags or counts on the parent based on children), but that’s a custom design rather than a single built‑in filter operator.”

What does that mean, or does anyone else have a better work around?

Hey @BRegan4 - thanks for posting in the Community!
To better provide you support here, can you outline a bit more detail regarding this use case? Specifically, are you referring to all child companies in your portal, or a specific set of child companies?
While we await an update, I’d like to tag in some Community experts to see what they may know regarding how to approach this. @karstenkoehler, @Phil_Vallender, and @Kevin-C - any thoughts here?
Shane, Senior Community Moderator

Thank you! All child companies associated with one parent company. Does that answer your question?

Hi @BRegan4,

This indeed requires a few additional steps, here’s how I would solve this. Essentially you need 2 roll-up properties and 1 calculation property for this: Create calculation and rollup properties

  1. Create a roll-up property that counts how many associated child companies there are
  2. Create a roll-up property that counts how many associated child companies there are which meet your property criteria
  3. Create a calculation property which checks if the values of the two properties above are the same (custom equation, output boolean, using an if statement)

You can then filter for the property from step 3 being true - which means all child companies meet your property criteria.

Have a look and let me know if you have any follow-up questions or need screenshots!

Thank you @karstenkoehler! This work with a workflow, but I am having some trouble with the calculation formula only calculating parent records. Here is the current formula I am using: if(((is_known([properties.hs_num_child_companies]) && is_known([properties.of_child_companies_client])) && ([properties.hs_num_child_companies] == [properties.of_child_companies_client])), true, false)

Also to note is that HubSpot already has a property that counts associated child companies, so the first property that you listed did not need to be created!

@BRegan4 thanks for pointing out the default property :slightly_smiling_face:

The formula should be simpler unless I’m missing something.

if(number_of_associated_child_companies = number_of_associated_child_companies_meeting_filter_criteria, true, false)

(spelling the property names correctly, of course)

That was my initial formula, but then the calculated property was updated and appeared on the children properties.

For example - Parent Test has 2 children

Child 1 and Child 2 would also have that formula calculated to them and set as TRUE because they have 0 children and 0 children designated to that logic, so the calculated formula would be set to TRUE. Does that make sense?

I was able to set this up correctly with a workflow using an if branch, but my thought is a calculation property would be cleaner

@BRegan4 got it - if you work in another if statement that returns false when one of the roll ups is 0, that would solve it, wouldn’t it?

Wow, yes absolutely! As simple as that :slightly_smiling_face: Thank you!