Execution Metadata Function with a condition
I'm encountering an error when executing the code below within an HTML AJO file.
{{executionMetadata key='CODIGO' value=
{%#if profile._cogna.cogna_student_profile_attributes.DS_ASSINATURA = "PITAGORAS" %}
'2'
{%else if profile._cogna.cogna_student_profile_attributes.DS_ASSINATURA = "UNIC" %}
'3'
{%else if profile._cogna.cogna_student_profile_attributes.DS_ASSINATURA = "UNIDERP" %}
'4'
{%else if profile._cogna.cogna_student_profile_attributes.DS_ASSINATURA = "UNIME" %}
'5'
{%else if profile._cogna.cogna_student_profile_attributes.DS_ASSINATURA = "UNOPAR" %}
'6'
{%else%}
'1'
{%/if%}
}}
The idea is to use the executionMetadata function, but with its value being a condition based on a field from a dataset.
The error message is: Invalid syntax found: '{'. Error beginning at position: Line 1, Character 40
How can I resolve this?