CMS Development

mmcgowan702
Participante

Help with HubL

resolver

Hello all,

 

I am new here and while training on HubSpot, I am also trying to learn HubL for our email program. I am trying to do a “simple test” to see if a property is NULL or not. Based on what I have learned and read the code I am using is;

{% if contact.contact_opeid.value is none %}

OPEID is Null

{% else %}

OPEID is Not Null

{% endif %}

 

I have been testing different variations of this with no success. I test it on accounts where I know the property is NULL and yet the test keeps showing the default ‘OPEID is Not Null’.

 

The property is a single line text restricted to numeric values, no special characters, and has visibility in forms, pop-ups and bots, and also shows in search results

 

I’m sure it is something simple but if any one could tell what I am doing wrong, I would appreciate it.

0 Me gusta
1 Soluciones aceptada
Indra
Solución
Guía | Partner nivel Elite
Guía | Partner nivel Elite

Help with HubL

resolver

@Jaycee_Lewis thanks for mentioning.

 

Hi @mmcgowan702,

 

Have you checked the documentation for the if stamtements?

If you want to check to a string or value you should use quotes like this

{% if contact.contact_opeid.value == 'none' %}


Indra Pinsel - Front-end developer - Bright Digital
Did my answer solve your issue? Help the community by marking it as the solution.

Ver la solución en mensaje original publicado

0 Me gusta
2 Respuestas 2
Indra
Solución
Guía | Partner nivel Elite
Guía | Partner nivel Elite

Help with HubL

resolver

@Jaycee_Lewis thanks for mentioning.

 

Hi @mmcgowan702,

 

Have you checked the documentation for the if stamtements?

If you want to check to a string or value you should use quotes like this

{% if contact.contact_opeid.value == 'none' %}


Indra Pinsel - Front-end developer - Bright Digital
Did my answer solve your issue? Help the community by marking it as the solution.
0 Me gusta
Jaycee_Lewis
Administrador de la comunidad
Administrador de la comunidad

Help with HubL

resolver

Hey, @mmcgowan702 👋 Welcome to the community! Let's invite some of our community members to the conversation, @BarryGrennan @Indra, do you have any tips you can share with a fellow learner?

 

Thank you very much! — Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 Me gusta