CMS Development

mmcgowan702
参加者

Help with HubL

解決

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 いいね!
1件の承認済みベストアンサー
Indra
解決策
ガイド役 | Elite Partner
ガイド役 | Elite Partner

Help with HubL

解決

@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 いいね!
2件の返信
Indra
解決策
ガイド役 | Elite Partner
ガイド役 | Elite Partner

Help with HubL

解決

@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 いいね!
Jaycee_Lewis
コミュニティーマネージャー
コミュニティーマネージャー

Help with HubL

解決

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 いいね!