Zap Tokens

Navigation:  Tokens >

Zap Tokens

Previous pageReturn to chapter overviewNext page

A zap token tells Q++Studio to delete the current textbox if a certain condition is true, or a series of conditions are all true.

 

An example would be [a1zd=22] which means zap the current textbox if the value of the token [d] is equal to 22. In that example, the ZapPrefix is 'z' and the ZapCondition is 'd=22'.

 

The overall structure of the TokenRoot of a zap token is:

 

[ ZapPrefix ZapCondition(s) ]

 

An example would be [a1zd=22] which means zap the current textbox if the value of the token [d] is equal to 22. In that example, the ZapPrefix is 'z' and the ZapCondition is 'd=22'.

 

ZapPrefix

This is always the letter 'z', sometimes followed by the letter 'L'.

 

Delete Box: If the ZapPrefix is 'z' then only the current textbox will be deleted if the ZapCondition is true.

Delete Group: If the ZapPrefix is 'Z' then any object grouped to the current textbox will also be deleted if the ZapCondition is true.

Delete Layer: If the ZapPrefix is 'Z' followed by 'L' (that is to say 'ZL'), then all the objects that are located in the same layer and the same page as the textbox containing the Zap Token are deleted (whether or not they are grouped).

Delete Page: If the ZapPrefix is 'Z' followed by 'P' (that is to say 'ZP'), then the page (the entire page, not just the objects on it) containing the textbox containing the Zap Token is deleted (for testing testing/debugging purposes, you can use the Keep Pages diary generation option to delete all objects on the page, and leave a marker that the page is to be deleted, instead of deleting the actual page).

ZapCondition(s)

This is any valid condition, as defined in Conditional Tokens.

 

Multiple conditions, separated by a pipe sign may be used to zap if multiple conditions are all true.

 

[ ZapPrefix | ZapCondition1 | ZapCondition2 | ... ]

 

In multiple condition zap tokens, the first pipe sign "|" must occur immediately after the z, Z or ZL prefix, and there should be no pipe sign at the end.

 

Zap tokens can also be combined with Conditional Tokens to delete textboxes based on multiple conditions.

 

Note that Zap Tokens are a special case of Conditional Tokens. For example, we could rewrite the zap token [a1zd=22] as [a1?d=22|zap|].


Topic 180976 updated on 29-Nov-2018.
Topic URL: https://www.qppstudio.net/webhelp_xv4/index.html?zaptoken.htm