I am trying to create a conditional statement for the marketing email. The statement should show text based on TWO FIELDS on the contact. I keep getting the same syntax error and I am lost here.
The fields on the contact are
- gendercode: Male (value: 1) and Female (value:2)
- new_Communicationsalutation: Formal and Informal
Communication Salutation is a custom field - option set that has the values:
- formal (value: 100.000.000)
- informal (value: 100.000.001)
The statement is the following:
- If contact is Male
- If contact has a formal communication salutation
show:
Sehr geehrter Herr {{contact.lastname}}
else:
- If contact is Male
- If contact has INFORMAL communication salutation
show:
Lieber {{contact.firstname}}
The same will be applied to the Female.
The statement:
{{#if (eq contact.gendercode 1)}}{{#if (eq contact.new_Communicationsalutation 100.000.000)}}Sehr geehrter Herr {{contact.lastname}}{{/if}}{{/if}}
{{#if (eq contact.gendercode 1)}} {{#if (ne contact.new_Communicationsalutation 100.000.000)}}Lieber {{contact.firstname}}{{/if}}{{/if}}
{{#if (eq contact.gendercode 2)}} {{#if (eq contact.new_Communicationsalutation 100.000.000)}}Sehr geehrte Frau {{contact.lastname}}{{/if}}{{/if}}
{{#if (eq contact.gendercode 2)}} {{#if (eq contact.new_Communicationsalutation 100.000.000)}}Liebe {{contact.firstname}}{{/if}}{{/if}}
Error: Dynamic content contains a syntax error (such as a missing curly bracket) in or near the following code: {{#if (eq contact.new_Communicationsalutation 100.000.000)}}Sehr geehrter Herr {{contact.lastname}}{{/i.
https://docs.microsoft.com/en-us/dynamics365/marketing/dynamic-email-content#conditional-statements-and-comparisons - this is what I used to create the statements:
- {{#if A}}{{#if B}}<DisplayedContent>{{/if}}{{/if}}
What am I doing wrong?