[ifHol] : Holidays Response Tokens

Navigation:  Tokens > Holidays Tokens >

[ifHol] : Holidays Response Tokens

Previous pageReturn to chapter overviewNext 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.

m

Corresponds to the Moon phase token [mp] (calculated using the first Moon Data Source)

s

Corresponds to the Season token [se] (calculated using the first Sun Data Source)

z

Corresponds to the Sun in Zodiac token [sz] (calculated using the first Sun Data Source)

 

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.

ifHoL

Checks if at least 2 (ie. one pair) 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~HoL

Checks if none, or only one, of the tokens referred to by the HolTokList is non-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.

 

Some additional tips:

The 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).

If you want the result of a Holidays Response Token to cause the current textbox to be deleted you can use zap as ResultText (or ZAP to delete the current textbox and any object that is grouped with it).

You can add a duration suffix to perform the response over a period of time longer than a day. For example, [1ifHOL:ae: / :m+00] would be converted to " / " if there was at least one a-Holiday and one e-Holiday in the current month.

You can use using Specific Holidays Sets Modifiers within Holidays Response Tokens. For example is you wanted to add a bullet if there was a holiday for both [fa:1] and [fe:2] then you would use the Holidays Response Token [ifHOL:a1e2:•].


Topic 178150 updated on 05-Jul-2016.
Topic URL: http://www.qppstudio.net/webhelp/index.html?holidays_response.htm