Hello. I have a property that is a "Multiple checkboxes" property.I need the number of the values selected, rather than the actual value. Ex. Property called "Country" - USA (selected) - Mexico (NOT selected) - Brazil (selected) - Argentina (selected) - Denmark (NOT selected)
I would need the nimber of the selected countries, in this case the number 3. My initial idea was to create a workflow that would update another property based on the what was selected. But by having 10 options, the math gets crazy. So, is there any way of using Java or integrations to help me get this done? Thank you
You have one number property that's called Number of values selected, for example. This is the property that counts how many options/values have been selected.
Let's assume your property, whose values you want to count for each contact, is called Selection and it has values A through E.
Your workflows would look like this:
Workflow 1: If Selection is "A", then increase Number of values selected by 1.
Workflow 2: If Selection is "B", then increase Number of values selected by 1.
Workflow 3: If Selection is "C", then increase Number of values selected by 1.
Workflow 4: If Selection is "D", then increase Number of values selected by 1.
Workflow 5: If Selection is "E", then increase Number of values selected by 1.
That way, if a contact selects "B" and "E", for example, two workflows will trigger (2 and 5). Each will count up the number property by 1, resulting in a value of 0+1+1=2 in the property Number of values selected.
Does that make sense?
Best regards!
Karsten Köhler HubSpot Freelancer | RevOps & CRM Consultant | Community Hall of Famer
It feels wrong but: You should get what you're looking for by creating 10 separate workflows which +1 an enumeration property. One workflow for each value.
Hope this helps!
Karsten Köhler HubSpot Freelancer | RevOps & CRM Consultant | Community Hall of Famer
The workflow/s would be too complicated, and even if build properlly it would create a mess once we need to add, delete or change any of the options. I wanted to see if this can be done by using "Java code" or maybe some integration or something. Thanks
You have one number property that's called Number of values selected, for example. This is the property that counts how many options/values have been selected.
Let's assume your property, whose values you want to count for each contact, is called Selection and it has values A through E.
Your workflows would look like this:
Workflow 1: If Selection is "A", then increase Number of values selected by 1.
Workflow 2: If Selection is "B", then increase Number of values selected by 1.
Workflow 3: If Selection is "C", then increase Number of values selected by 1.
Workflow 4: If Selection is "D", then increase Number of values selected by 1.
Workflow 5: If Selection is "E", then increase Number of values selected by 1.
That way, if a contact selects "B" and "E", for example, two workflows will trigger (2 and 5). Each will count up the number property by 1, resulting in a value of 0+1+1=2 in the property Number of values selected.
Does that make sense?
Best regards!
Karsten Köhler HubSpot Freelancer | RevOps & CRM Consultant | Community Hall of Famer
Hi Im facing a similar scenario, where your approach was the first that came to me first, but then my scenario is, My checkbox property contains events and there are 75+ events, and also new events keep adding every two weeks. This approach is a bit leangthy and high maintenance in the long run.
I'm trying to do something similar here, and the problem I have with this workflow is the Number of values selected can only be increased and never decreased. So if a user checks a box but then later clears it, the value doesn't change accordingly.
At the beginning of the workflow, try clearing (Clear Value) the property followed by the actual workflow of adding +1. And keep the renrollment trigger on, so each time when the contact gets enrolled, it clears the old value and the new value is calculated by the workflow. Hope this will help.
Thanks @AmalJood, but we ended up replacing this workflow with one wherein everything is a task, with each task going into one of a few queues that we can then report on.
I'll keep this in mind if we end up doing something similr in the future.