This article will cover the syntax of the ‘Trace’ regular script statement.
This statement is used to write a comment to the execution log window and the execution script. This can be really useful for debugging.
Statement syntax
Trace string;
String | String to be added to the log. Variables can be expanded and logged too. |
Example
A comment expanding out a variable is added to the script execution log.
ITEM_DETAILS:
LOAD
*
FROM [lib://Public:DataFiles/ITEM_DETAILS.qvd] (qvd);
Let fields = NoOfFields('ITEM_DETAILS');
Trace there are $(fields) fields in the table ITEM_DETAILS.
Result
The comment is added to the script execution log window.