Jump to content

Custom Field Variables


SJEaton
 Share

Recommended Posts

Hi

 

I've been using a lot of Custom Variables e.g. {{.H_custom_a}} to pull through form responses into auto-emails.  I have instances however where the customer may have left a field blank when they completed the online form so what happens is that when the email is received the customer sees {{.H_custom_a}} in the email text and will wonder what that is.  Is there a way of presenting a blank instead of a variable name in instances like this?

 

Thanks

Samantha 

Link to comment
Share on other sites

Thanks Alex, this is cool but the example doesn't quite help me fully as it doesn't explain what I need to put in the Expression field if I just don't want a variable to show if a field value is blank.    

This is an example of the email I'm creating.  Basically as the customer didn't enter info for a 3rd device I want {{.H_custom_f}} and {{.H_custom_g}} to not appear. 









  

Sam

Link to comment
Share on other sites

@SJEaton indeed, the wiki is not very explicit when it comes to expression configuration for variable empty value. So, for example, to cater for empty values of {{.H_custom_a}}, your expression needs the be like this:

'{{.H_custom_a}}' NOT LIKE '%{.H_custom_a}%'

Technical explanation: This is because if the {{.H_custom_a}} variable does not have a value, it does not actually evaluates to empty or NILL, it evaluates to the variable name as string. Hope this make sense :)

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...