Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Trace()

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

1 Solution

Accepted Solutions
MayilVahanan

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

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

6 Replies
MayilVahanan

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

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Anonymous
Not applicable
Author

Chris

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

     trace   Test Message ;

Best Regards,     Bill

Not applicable
Author

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

Not applicable
Author

Thanks for the answers everyone.  That clears it up.

Colin-Albert

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
Author

Helpful tip, thanks Colin.