Please enable JavaScript to view this site.

 

Navigation: Tokens

Zap Tokens

Scroll Prev Up Next More

Zap tokens are a special case of conditional tokens, and delete the textbox containing the zap token, if a certain condition is true, or a series of conditions are all true.

 

The structure of a zap token is:

 

[ZapPrefix Condition1|Condition2|...]

 

For example, the token [a1zd=22] means delete the current textbox if the value of the token [a1d] is equal to 22. In that example, the ZapPrefix is 'z' and the Condition is 'd=22'.

 

The details of the above are:

 

ZapPrefix

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

 

Delete Box

If the ZapPrefix is 'z' then only the current textbox will be deleted if the Condition is true.

Delete Group

If the ZapPrefix is 'Z' then any object grouped to the current textbox will also be deleted if the Condition 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), if the Condition is true. (requires QuarkXPress 2016-2025 or InDesign)

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, if the Condition is true. (requires QuarkXPress 2016-2025 or InDesign)

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.

 

QuarkXPress limitations

 

The use of the delete layer or delete page zap tokens requires QuarkXPress 2016-2025 (or any version of InDesign).

 

Zap tokens in InDesign tables

 

When a Delete Box zap token is located anywhere inside an InDesign table, its effect is to delete the entire table object in which the zap token is located. The effect of a Delete Group zap token, located anywhere inside an InDesign table, is to delete the parent textbox of the table in which that zap token is located.

Condition(s)

This is any valid condition, as defined in conditional tokens (remember that conditions can include tokens).

 

Multiple conditions

 

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

 

[ ZapPrefix | Condition1 | Condition2 | ... ]

 

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

 

Examples of multiple conditions

 

The token [a1z|d=22|d#=3] means zap the current textbox if the value of the token [a1d] is equal to 22 and the value of [a1d#] equals 3 (ie. when the date is Wednesday the 22nd).

 

To zap if any of the conditions are true, use separate zap tokens.

 

Returning to the above example, using the 2 separate tokens [a1zd=22][a1zd#=3] means zap the current textbox if the value of the token [a1d] is equal to 22 or the value of [a1d#] equals 3 (ie. when the date is either a Wednesday or the 22nd of the month, or both).

 

 


Topic 180976, last updated on 18-Sep-2024