HUBL Get Values from Multiple Checkbox Field on Company Then Loop


I’m creating a custom module to place into an email. It will look at the contact’s company record for the product lines the company purchases and output a list with a link to a webpage about each product line they are interested in.

The company property is called “product_line” and the options are setup like product_line_1:1 (label:value).

When I get company.product_line via HUBL, I’m given a csv output of the labels like “product_line_1, product_line_5”, but what I want is to get the values and then loop through them with an if statement like if value = 1, show link to product_line_1 webpage…

Can anyone shed some light on how to loop through the values of multiple checkboxes?

Thank you!!


Properties with multiple options will be rendered as strings, with each option separated by a comma. You can use the split HubL Filter to split the options into a list of strings, then loop through that resulting list.