We use cookies to make HubSpot's community a better place. Cookies help to provide a more personalized experience and relevant advertising for you, and web analytics for us. To learn more, and to see a full list of cookies we use, check out our Cookie Policy (baked goods not included).
Jul 4, 2022 3:35 PM - edited Jul 4, 2022 3:54 PM
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
Solved! Go to Solution.
Jul 5, 2022 7:31 AM
Hi @BAtanasoski9,
I'll try to rephrase.
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:
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 |
![]() | Did my post help answer your query? Help the community by marking it as a solution. |
Jul 4, 2022 3:47 PM
Hi @BAtanasoski9,
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 |
![]() | Did my post help answer your query? Help the community by marking it as a solution. |
Jul 4, 2022 3:59 PM - edited Jul 4, 2022 4:00 PM
Hey Karsten.
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
Jul 5, 2022 12:27 AM
Hi @BAtanasoski9,
The workflows wouldn't be complicated, they would all be quite simple in fact:
Workflow 1: Enroll contact when property value is 1, then count up number property by 1
Workflow 2: Enroll contact when property value is 2, then count up number property by 1
Workflow 3: Enroll contact when property value is 3, then count up number property by 1
... et cetera
Whenever a new property value is added, you would simply add one workflow. There isn't any complicated branching for combinations happening here.
Best regards!
Karsten Köhler |
![]() | Did my post help answer your query? Help the community by marking it as a solution. |
Jul 5, 2022 7:27 AM
I'm sorry but I don't understand.
The property is a deal property
Jul 5, 2022 7:31 AM
Hi @BAtanasoski9,
I'll try to rephrase.
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:
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 |
![]() | Did my post help answer your query? Help the community by marking it as a solution. |
3 weeks ago
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.
Any suggestions?
Jul 5, 2022 8:41 AM
That makes sence.
This could work.
Thank you