Tokens > Holidays Tokens >

[ifHol] : Holidays Response Tokens

Return to Introduction  Previous page  Next page  

Holidays Response Tokens can be used to display some text (including also special characters) if and only if the result of converting many holidays tokens is different from a blank space. This can be used, for example, after a series of holidays tokens such as [1fa][1fâ][1fe][1î] to separate them from the next line, but only if the preceding tokens evaluate to something (see the examples at the bottom of this topic).

 

The structure of this token is as follows:

 

       [ifMarker:HolListTok:ResultText]

 

The HolListTok specifies which holidays tokens we wish to check, and is made-up of a list of single characters, each representing a possible holidays token. The correspondence between these characters and various holidays tokens is as follows:

 

a e i o u

Corresponds to the [fa]..[fu] holidays name token.

â ê î ô û

Corresponds to the [â]..[û] holidays symbols token.

à è ì ò ù

Corresponds to the [fâ]..[fû] holidays abbreviation token.

á é í ó ú

Corresponds to the watermark token.

ä ë ï ö ü

Corresponds to the Saints tokens.

 

The ifMarker determines if we are looking for all the holidays tokens specified in HolListTok to be non-blank, or for any one of them only, and can have one of the following values:

 

ifHol

Checks if any of the tokens referred to by the HolTokList is non-blank.

ifHOL

Checks if all of the tokens referred to by the HolTokList is non-blank.

if~Hol

Checks if none of the tokens referred to by the HolTokList is non-blank (this is the opposite of ifHol, hence the ~ used).

if~HOL

Checks if at least one of the tokens referred to by the HolTokList is blank (this is the opposite of ifHOL, hence the ~ used).

 

If the condition of the ifMarker is true for the series of holidays tokens referred to by HolListTok, then the token will be replaced by ResultText. Below are some examples:

 

[3ifHol:aeâê:/]

This token will be replaced by a front-slash (/) if the combined result of the tokens [3fa] [3fe] [3â] [3ê] is not blank (ie. if any of these 4 tokens is not blank).

[2ifHOL:aë:, ]

This token will be replaced by a comma and a space, if the result of each one of the tokens [2fa] [2:st_e] is not blank (ie. if all 2 tokens are not blank).

[5if~Hol:aeî:&c]

This token will be replaced by a hard return if the combined result of the tokens [5fa] [5fe] [5î] is blank. This can thus be used to show alternative text when there are no holidays of the specified tokens.

 

Note that ResultText can contain other tokens, in which case the [] braces should be replaced by _ underscores (this is the same convention as the one used to include tokens inside zap tokens).


Topic 178150 updated on 02-Oct-06
Topic URL: http://www.qppsupport.net/webhelp/index.html?holidays_response.htm