# Problem with contact variables Hubl eMail

**URL:** <https://community.hubspot.com/t/problem-with-contact-variables-hubl-email/8377>\
**Category:** CMS Development\
**Created:** [April 4, 2018, 12:39pm UTC](https://community.hubspot.com/t/problem-with-contact-variables-hubl-email/8377 "2018-04-04T12:39:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![stabuenca](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/stabuenca/32/8409_2.png) [@stabuenca](https://community.hubspot.com/u/stabuenca)\
**Post date:** [April 4, 2018, 12:39pm UTC](https://community.hubspot.com/t/problem-with-contact-variables-hubl-email/8377/1 "2018-04-04T12:39:59Z")

</div>

Hello,

I am trying to use hubl to simplify an issue we have.

We have two contact variables for two files (contact.file1 and contact.file2), if any of these variables has the value=1 then we have to add a link to this file.

We have write this code, but it doesn’t work

{% set theFile1 = contact.file1 %}  
{% set theFile2 = contact.file2 %}  
{% if theFile1== 1 %} \<p\>URL to file 1\</p\>{% endif %}  
{% if theFile2== 1 %} \<p\> URL to file 2\</p\> {% endif %}  
\<!-- below here we print the value of these variables and the print is ok, it prints 1 or 0 without any problem --\>  
\<p\>{{theFile1}}\</p\>  
\<p\>{{theFile2}}\</p\>

Any help is welcome

Thanks in advance

Santiago

---

<div class="post-metadata">

**Author:** ![stabuenca](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/stabuenca/32/8409_2.png) [@stabuenca](https://community.hubspot.com/u/stabuenca)\
**Post date:** [April 4, 2018, 12:55pm UTC](https://community.hubspot.com/t/problem-with-contact-variables-hubl-email/8377/2 "2018-04-04T12:55:06Z")

</div>

_Sorry, now I have found the same question here in the community, and now I realize that it is not possible to use a contact variable in an “if” in emails._

_It is a problem, because we have a lot of combinations, perhaps hubspot could analyze this problem and proposal to improve this tool._

_Best regards_
