Develop > Wizards Guide > Troubleshooting > JavaScript syntax errors

JavaScript syntax errors

The wizard stops executing, and the user is returned to the calling application with the following error message(s) at the top of the screen:

Process panel <panel name> in RAD wizard.run encountered error in line 5 (wizard.run,<panel name>)

Process panel init.expr in RAD wizard.run encountered error in line 5
(wizard.run,init.expr)

Cannot evaluate expression (wizard.run,init.expr)

Script <UNKNOWN> line 1: ERROR ReferenceError: test is not defined at char 1

Unrecoverable error in application: se.call.process on panel call.rad.1

Unrecoverable error in application: wizard.run on panel init.expr

Cause

Invalid syntax was entered in a JavaScript tab. The RAD application and panel will give you a hint as to which JavaScript tab the syntax error was entered. Refer to the table below for help in determining where to make the fix.

RAD application/panel Where to fix

wizard.run,init.expr

JavaScript subtab of the File Selection tab.

wizard.run,select.file.setup

Query statement in the Select $L.file by subtab of the File Selection tab.

wizard.run,run.expressions

Expressions subtab of the Actions tab.

wizard.run,exit.cancel

Javascript Executed on Cancel subtab of the Cancel Expressions tab.

Fix

Correct syntax for JavaScript expressions is discussed in the JavaScript Programmer's Guide. When using JavaScript, you must define variables before using them. For example:

var <name>=new String()

The correct syntax for assigning a value to a field is as follows:

Table.field1=value

To compare the values of two fields to each other, use the following syntax:

Table1.field1==table2.field2