Counter of selected options in a Multiple Checkbox Custom Property

SOLVE
BrightNet_Admin
Member

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!

0 Upvotes
1 Accepted solution

Accepted Solutions
Mike_Eastwood
Solution
Key Advisor | Gold Partner

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

1 Reply 1
Mike_Eastwood
Solution
Key Advisor | Gold Partner

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