Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
Not applicable

What is Trace Keyword in QlikView


Hi All,

Can anybody tell me what is TRACE Keyword and why it is used with Exmple.....

Sarfaraz

7 Replies
Highlighted

Re: What is Trace Keyword in QlikView

From QlikView Help

Trace

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);

Regards

ASHFAQ

Not applicable

Re: What is Trace Keyword in QlikView

Hi Ashfaq,

Can you please elaborate the TRACE explanation..still i am confused ....Please attach some output of Trace keyword ...

I tried with the below code :-

TRACE 'C:\Users\Sarfaraz.Sheikh\Desktop\Sarfaraz\TAT Data\COMPLAINS TAT DATA.xls' Loaded;

Let MyMassage=NoOfRows('COMPLAINS TAT DATA.xls') & 'rows in COMPLAINS TAT DATA';

TRACE $(MyMassage);

when i click on reload nothing is appearing or appeared ....what exactly happening after reload i am not understanding...

Request you to please elaborate or attach some output here ...

Regards

Sarfaraz

MVP
MVP

Re: What is Trace Keyword in QlikView

Screen Shot 10-01-14 at 12.39 PM.PNG.pngScreen Shot 10-01-14 at 12.39 PM 001.PNG.png

Now if you use this Trace in between a long statement, you might not be able to see the output, because that gets executed fast and goes to next statement. If you want the see the output, better use Sleep command to wait for sometime like:

Trace 'Here is your message';

Sleep 2000;   // 2000 miliseconds

.....

.....

;

Re: Re: What is Trace Keyword in QlikView

Hi Sarfarz,

have a look at attached application.

Its used for debugging purpose.

Hope it helps

Regards

ASHFAQ

Re: What is Trace Keyword in QlikView

Safaraz

To look at table names & numbers of rows in the gui , create a table with system fields $Table & $Rows.

Not applicable

Re: What is Trace Keyword in QlikView

Can you give an example of what your trying to do?

Not applicable

Re: What is Trace Keyword in QlikView

Hi ASHFAQ,

Good explanation,  but the message flashed, where is the "log" located?

Thank you!

Stephen