# Liquid Syntax not picking up merge field

**URL:** https://integration.keap.com/t/liquid-syntax-not-picking-up-merge-field/90517
**Category:** Pro and Max
**Tags:** liquid, campaign-builder, email-builder, merge-fields
**Created:** [April 19, 2023, 3:45am UTC](https://integration.keap.com/t/liquid-syntax-not-picking-up-merge-field/90517 "2023-04-19T03:45:28Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Amber\_Johnston](https://avatars.discourse-cdn.com/v4/letter/a/47e85d/32.png) [@Amber\_Johnston](https://integration.keap.com/u/Amber_Johnston)
#### Post date: [April 19, 2023, 3:45am UTC](https://integration.keap.com/t/liquid-syntax-not-picking-up-merge-field/90517/1 "2023-04-19T03:45:29Z")

</div>

Hi I am trying to use liquid syntax in my advanced campaign emails.

Note, I have also paired with a developer on this and they haven’t been able to get it to work either.

When I use hard-coded values:  
{% if ‘1’ contains ‘1’ %} TEST {% else %} didnt work {% endif %}

It returns the successful result of TEST. But when I use a merge field containing 1 it returns the false result of didnt work.  
{% if ‘~contact.\_Postcodeswheretheyarelookingtobuy~’ contains 1 %} TEST {% else %} didnt work {% endif %}  
{% if contact.\_Postcodeswheretheyarelookingtobuy contains 1 %} TEST {% else %} didnt work {% endif %}  
{% if ~Contact.\_Postcodeswheretheyarelookingtobuy~ contains 1 %} TEST {% else %} didnt work {% endif %}

I have tried multiple variations of the above based on the keap documentation & normal liquid syntax and none are returning the correct result. I have also tried it with text strings instead of numbers, and that also fails.

I suspect that the contact field isn’t correctly being read in the first if statement. Any help would be appreciated!
