Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Not applicable

Trace()

What is the purpose of this function?  Would someone put up a quick example?

Tags (1)
1 Solution

Accepted Solutions
Highlighted

Re: Trace()

Hi

Please refer the help file

The trace statement writes a string to the Script Execution Progress window and to the script log file, when used.

It is very useful for debugging purposes. Using $-expansions of variables that are calculated prior to the Trace statement, you can customize the message.

The syntax is:

trace string

Examples:

trace Main table loaded;

Let MyMessage = NoOfRows('MainTable') & ' rows in Main Table';

trace $(MyMessage);

6 Replies
Highlighted

Re: Trace()

Hi

Please refer the help file

The trace statement writes a string to the Script Execution Progress window and to the script log file, when used.

It is very useful for debugging purposes. Using $-expansions of variables that are calculated prior to the Trace statement, you can customize the message.

The syntax is:

trace string

Examples:

trace Main table loaded;

Let MyMessage = NoOfRows('MainTable') & ' rows in Main Table';

trace $(MyMessage);

Re: Trace()

Chris

To put text in the reload log / on the screen during a reload;

     trace   Test Message ;

Best Regards,     Bill

Not applicable

Re: Trace()

The Trace function log the your comments to Log file. Just providing the comments in the Log file as well.

Not applicable

Re: Trace()

Thanks for the answers everyone.  That clears it up.

Re: Trace()

I always put a trace command at the start of each tab in the load script.
This allows you to see the progress of the load and assists in debugging errors.

trace ; puts a blank line in the log / execution progress window

trace === <Your Tab Name> === ;

trace ;

load....

Not applicable

Re: Trace()

Helpful tip, thanks Colin.