Query triggers are quite different than other triggers.
Refer to Validate Query Trigger for more information.
Query
Intrinsic Macros
Standard Macros in Trigger Macro Categories
Query Variables/Macros in Trigger Macro Categories
If the ValidateQuery program is a JPO, no macros are available as input arguments. To work around this issue, the ValidateQuery program should be a Tcl program that calls the JPO to do the actual work.