CRM

BrightNet_Admin
Member

Counter of selected options in a Multiple Checkbox Custom Property

SOLVE

Hi there.

Suppose that I have a custom property (Property 'A') with "multiple checkboxes". Is there a way to have another property (Property 'B') containing a counter of how many checkboxes are checked in Property 'A'?

 

Example:

Property A: classes attended

  • Math -> checked
  • Physics -> checked
  • Chemistry-> NOT checked
  • Literature -> NOT checked
  • Philosophy -> checked 

Property B: number of classes attended

Value = 3

 

Thanks in advance!

1 Accepted solution
Mike_Eastwood
Solution
Key Advisor | Gold Partner
Key Advisor | Gold Partner

Counter of selected options in a Multiple Checkbox Custom Property

SOLVE

Hi @BrightNet_Admin 

 

There are a few ways to do this:

 

a) set up a Workflow (requires Marketing Pro) to check each Option in Property A. If an Option is set (e.g. Math) then increment Property B. It's a good idea to set Property B to zero at the start of the workflow.

 

b) add some Javascript to the page where the Contact fills in the form. Whenever the Muli-checkbox changes count the courses and set a hidden field (Property B) to the count. When the Contact submits the form the hidden field would update in HubSpot.

 

c) create a HubSpot Integration that watches Property A for a change. The Integration would then call some code to update Property B based on Property A.

 

Each has pros & cons. They're in order of complexity (and budget).

 

Let me know if you need me to elaborate.

 

Mike

View solution in original post

4 Replies 4
Mike_Eastwood
Solution
Key Advisor | Gold Partner
Key Advisor | Gold Partner

Counter of selected options in a Multiple Checkbox Custom Property

SOLVE

Hi @BrightNet_Admin 

 

There are a few ways to do this:

 

a) set up a Workflow (requires Marketing Pro) to check each Option in Property A. If an Option is set (e.g. Math) then increment Property B. It's a good idea to set Property B to zero at the start of the workflow.

 

b) add some Javascript to the page where the Contact fills in the form. Whenever the Muli-checkbox changes count the courses and set a hidden field (Property B) to the count. When the Contact submits the form the hidden field would update in HubSpot.

 

c) create a HubSpot Integration that watches Property A for a change. The Integration would then call some code to update Property B based on Property A.

 

Each has pros & cons. They're in order of complexity (and budget).

 

Let me know if you need me to elaborate.

 

Mike

BAtanasoski9
Member

Counter of selected options in a Multiple Checkbox Custom Property

SOLVE

Hey @Mike_Eastwood 
I have the same problem, and solving it with a worflow will requre A TON of branches. 
Can you tell me more about the second and third option? 
I would appreciate your help greatly. Thanks

 

Mike_Eastwood
Key Advisor | Gold Partner
Key Advisor | Gold Partner

Counter of selected options in a Multiple Checkbox Custom Property

SOLVE

Hi @BAtanasoski9 

 

For some projects we created a HubSpot App that "subscribes" to changes in properties and triggers a webhook. The webhook then pushes some JSON to an endpoint on our server where we process the data and send it back to HubSpot.

 

Difficult to know the best process to recommend without seeing your setup. 

 

Feel free to get in touch if you want to jump on Zoom and show me your goal.

Mike

tj03
Participant

Counter of selected options in a Multiple Checkbox Custom Property

SOLVE

Can you elaborate on how to accomplish this with a Workflow?  I have a multi checkbox with 10 options.  If I set up If/Then branches, that requires A LOT of branches and sub branches since the workflow only executes the first branch it encounters where all criteria are met.  

To simplify, if my multi checkbox has 2 options (Option A and Option B), and both are active (checked), and I create a workflow where...

Branch 1:
If multi checkbox contains Option A, then increment count by 1

Branch 2:
If multi checkbox contains Option B, then increment count by 1

 

How do I get the workflow to move on to Branch 2 after executing Branch 1?

0 Upvotes