Using Tokens on the Right Side

Navigation:  Tokens > Conditional Tokens >

Using Tokens on the Right Side

Previous pageReturn to chapter overviewNext page

You can use tokens in the RightSide of a condition. The guidelines are :

 

Use underscores instead of braces for tokens used in the RightSide. For example, use _2d_ instead of the usual [2d].

You can use absolute DayValues; the form taken by the token like _2d_, where the 2 refers to DayValue 2 of the current grid.

Or you can use relative DayValues, where you specify the DayValue relative to the DayValue of the current conditional token. These are of the form : _+1d_ and _-1d_.

 

Examples :

 

[1zm=_7m_] : this will be true, in a weekly, if the month of the Monday is the same as the month of the Sunday. Useful to display the starting and ending dates of a week, without repeating the month name, if it is the same.

[zm=_-1m_] : this will be true if the month of the previous day, is the same as the month for the date of the conditional token.

[zd>_+1d_] : this will be true if the current date's day is larger than the next date's day (ie. we are on the last day of the month).

 

Note that the proper way to get a token on the RightSide to be based on the date of the conditional token is to use +0, as in [3zd=_+0m_], and not [3zd=_m_] which is treated by Q++ as [3zd=_1m_].

 

See also Evaluating Conditions.


Topic 108878 updated on 13-May-2016.
Topic URL: http://www.qppstudio.net/webhelp/index.html?usingtokensinzapconstants.htm