chrisnutt Posted February 12, 2018 Posted February 12, 2018 Hi, I'm trying to improve some email templates using ESP Conditions but I am having some difficulty. First of all, in my progressive capture I have set the attached to go into h_custom_a. However, the display value is what is populating the database and not the value. This leads onto my second problem. Can the ESP Conditions use text? I've done an ESP Condition that says {{.H_custom_a}} = "No" and {{.H_custom_a}} = 'No' and even {{.H_custom_a}} = No None of which seem to work; the lines that I want to show when the 'No' option has been selected (so making the above condition true) do not appear at all. Am I making a mistake? Thanks Chris
Victor Posted February 12, 2018 Posted February 12, 2018 @chrisnutt because the validation is made on both values being the same type (e.g. both string or numbers, etc...). For example this: {{.H_custom_a}} = 'No' is interpreted by the server as No = 'No'. therefore no match. So, to ensure both values are the same type for server parsing, you need this: '{{.H_custom_a}}' = 'No' *EDIT: by the way, in your example above, {{.H_custom_a}} = No won't work either because you need a string comparison so quotes are needed...
Gerry Posted February 12, 2018 Posted February 12, 2018 If .H_custom_a is a string value and you want to perform a comparison I would have thought (but dont know for sure) that the comparison would need to happen as part of the expression. so... {{.H_custom_a = "No"}}
chrisnutt Posted February 12, 2018 Author Posted February 12, 2018 Thanks both, @Victor your suggestion has worked. Thank you very much, that was stressing me out! Chris
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now