CMS Development

Octav
Participant

struggling with a dropdown select property

SOLVE

Hello, 

 

I'm trying to customize a quote template and i need to check what  values are selected in a dropdown select property but i can´t make it.

 

i have simple if sentence but i can't reach the code inside the if. 

{% if (BUYER_COMPANY.responsabilidades_fiscales).Prueba == true %} 

 

Can some help me, please? 

0 Upvotes
1 Accepted solution
SteveHTM
Solution
Guide | Partner
Guide | Partner

struggling with a dropdown select property

SOLVE

@Octav - the proerty values for a dropdown select are stored as string values inside the property. If 'Prueba' is one of the possible selections of the Company property 'responsabilidades_fiscales' then I think the correct HubL test would be:

{% if BUYER_COMPANY.responsabilidades_fiscales == 'Prueba' %}

You could also use the HubL operator string_containing if the property can contain multiple selected dropdown values
(https://developers.hubspot.com/docs/cms/hubl/operators-and-expression-tests#string-containing)

 

I hope this is helpful.

 

Steve

Steve Christian

HTM Solutions

https://info.htmsolutions.biz/meetings/stevec2

mobilePhone
+1 6195183009
emailAddress
stevec@htmsolutions.biz
website
www.htmsolutions.biz
address
San Diego, CA
Create Your Own Free Signature

View solution in original post

0 Upvotes
2 Replies 2
SteveHTM
Solution
Guide | Partner
Guide | Partner

struggling with a dropdown select property

SOLVE

@Octav - the proerty values for a dropdown select are stored as string values inside the property. If 'Prueba' is one of the possible selections of the Company property 'responsabilidades_fiscales' then I think the correct HubL test would be:

{% if BUYER_COMPANY.responsabilidades_fiscales == 'Prueba' %}

You could also use the HubL operator string_containing if the property can contain multiple selected dropdown values
(https://developers.hubspot.com/docs/cms/hubl/operators-and-expression-tests#string-containing)

 

I hope this is helpful.

 

Steve

Steve Christian

HTM Solutions

https://info.htmsolutions.biz/meetings/stevec2

mobilePhone
+1 6195183009
emailAddress
stevec@htmsolutions.biz
website
www.htmsolutions.biz
address
San Diego, CA
Create Your Own Free Signature
0 Upvotes
Octav
Participant

struggling with a dropdown select property

SOLVE

@SteveHTM 

 

I made it! Thanks to your explanation and the examples that you gave me.

 

Thank you, so much. 

 

 

0 Upvotes