Use Google to find help fast. For example, search on "xpressdox choosefromlist".

Conditional processing – If, Else, When

Conditional processing – If, Else, When

Text can be included in or excluded from the merged document depending on the value of data in the data set. For example, suppose special wording is required when the BalanceOutstanding is greater than $10000; the If command would be used like this:

We note that your account is overdrawn by an amount of $<<BalanceOutstanding>>. Please ensure that this amount is paid to us within 48 hours<<If(BalanceOutstanding > 10000)>> failing which you will be handed over to our attorneys<<End()>>.

The Else() command can be used in conjunction with If:

The document must also be signed by <<If(PartyType=“Minor”)>>the legal guardian<<Else()>>the party’s marital partner<<End()>>.

The When command can be used when the text to be included or excluded is small and requires no MS Word formatting. For example adding an ‘s’ to pluralize:

This fax consists of <<NumberOfPages>> page<<When(NumberOfPages != 1,s)>>.

or

If appropriate, <<When(Gender = "Male",he,she)>> will be required to use public transport to get to work.

2 thoughts on “Conditional processing – If, Else, When

  1. I currently testing this progrmam, and evethough I have been able to create a few templates, sometimes the commands that I have used before do not work properly in new templates.

    In particular I am trying to set up a conditional wording using the “If” command combined with the “ChoseFromRDBList” command. It has worked for
    me before, however, in this case has not:

    «ChooseFromRDBList(Mayor_de_edad,Si,No)» «If(“Mayor_de_edad”=Si)»mayor de edad,«End()»

    When I run the template it always returns me the same phrase “mayor de edad”, whether I chose “Si” or “No”. It is my intention that the phrase “mayor de edad” may only appear in case I chose “Si”.

    Can anybody explain me wha I am doing wrong?

    1. You’ve nearly got it right. What you need is:

      «ChooseFromRDBList(Mayor_de_edad,Si,No)» «If(Mayor_de_edad=”Si”)»mayor de edad,«End()»

      This is because Mayor_de_edad is a data element, whose value is either “Si” or “No”, whereas “Mayor_de_edad” is a string constant (because it is in quotes) whose value is always “Mayor_de_edad”.

      Good luck …

Leave a Reply