It is not possible to nest if-then-else statements in the Word export templates:
<% if ConditionA %>
<% if ConditionB %>
<% else %>
<% endif %>
<% else %>
<% if ConditionC %>
<% else %>
<% endif %>
<% endif %>
According to CS89313 the statements can be rewritten (with AND condition), but that would create a huge number of statements, when using several conditions:
<% if (ConditionA) AND (ConditionB) %>
<% elseif ConditionA %>
<% elseif ConditionC %>
<% else %>
<% endif %>
My intentation was to check for empty fields and the apply different formatting in Word. But that would mean to check lots of combinations of fields with AND conditions resulting in a hugh template. The nesting of the statements would solve that problem. Actually I was very surprised, that such basic progamming techniques are not possible.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.