Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
CUSTOMERS ONLY: Now accepting customer applications for the 2023 Luminary Program: SUBMIT NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
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
ashfaq_haseeb
Champion III
Champion III

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
Author

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

tresesco
MVP
MVP

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

.....

.....

;

ashfaq_haseeb
Champion III
Champion III

Hi Sarfarz,

have a look at attached application.

Its used for debugging purpose.

Hope it helps

Regards

ASHFAQ

bill_markham
Champion III
Champion III

Safaraz

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

Not applicable
Author

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

Not applicable
Author

Hi ASHFAQ,

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

Thank you!

Stephen