Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
martynlloyd
Partner - Creator III
Partner - Creator III

What is the function to write a message to the script execution dialog?

During the script execution process, I wish to write some comments to the log to help me track the reload process.  Debug is not available as the process is running on a secured server.

1 Solution

Accepted Solutions
jerem1234
Specialist II
Specialist II

I think Trace is what you are looking for, from 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);

Hope this helps!

View solution in original post

3 Replies
jerem1234
Specialist II
Specialist II

I think Trace is what you are looking for, from 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);

Hope this helps!

datanibbler
Champion
Champion

Hi Jeremiah,

great!

I knew about the TRACE statement elsewhere - but I would never have thought of using it in this context.

That is the sort of thing I would propose for putting into a WIKI for every newcomer to consult - if I had known this about a year ago when I started doing this, it would have helped me a great deal.

Best regards,

DataNibbler

martynlloyd
Partner - Creator III
Partner - Creator III
Author

Thats great Jeremiah, many thanks!

Is there a way to do this in a subroutine?

FOR Each Dir in dirlist (Root&'\*' )
TRACE $(Dir);
call DoDir (Dir)
NEXT Dir

Regards,

ML.