Develop > Wizards Guide > Troubleshooting > RAD expression syntax errors

RAD expression 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 2 (wizard.run,<panel name>)

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

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

Bad arg (2) oper = (wizard.run,init.expr)

Bad arg (3) oper index (wizard.run,init.expr)

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

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

Cause

These errors are caused by syntax errors in the wizard panels. The panel name gives you a hint as to where the issue occurred.

Bad arg (x) oper operator y indicates improper syntax of a statement or a missing or invalid parameter that is expected to be supplied to the statement.

Bad arg (1 or 2) oper <operator>: arg 1 indicates that the issue is to the left of the <operator>. If it is arg 2, then the issue is to the right of the <operator>. For example, operator can be defined as follows: = , < , > , ~= , ~< , ~> , etc.

Bad arg (1 or 2) oper <in> arg 1 indicates that the issue is to the left of "in" within the statement. If arg is 2, then the issue is to the right of "in" within the statement.

Bad arg (x) oper <function> indicates that the number of the parameter that was passed to the function is invalid.

The following table will help you find where in the wizard panel the error occurred and where to make the fix.

RAD application/panel Where to fix

wizard.run,init.expr

Initial Expressions 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,get.selection.records Query statement in Selection Criteria on the Usage tab.

wizard.run,run.expressions

Expressions subtab of the Actions tab.

wizard.run,decide.restart Restart Panel if field on the Actions tab.
wizard.run,get.message Condition field of the Messaging tab.
wizard.run,setup.wizard.variables Wizard variables on the Variables tab.
wizard.run,find.next.wizard Condition field on the Next Wizard tab.
wizard.run,exit.cancel

Expressions Executed on Cancel subtab of the Cancel Expressions tab.

Fix

Correct syntax for RAD expressions is discussed in the System Language topics in the Service Manager Online Help. You can view this help by clicking Help > Help Contents if you are using a Windows client, or pressing F1 if you are using a web client.

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

<field> in $L.file=value

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

<field1> in $L.file=<field2> in $L.file

Any concatenated statement containing a field name and a variable needs to be entered as follows:

"agreement.id=" +$G.test where $G.test is numeric or Boolean.

"agreement.id =\"" + $G.test + "\"" where $G.test is a character.

"agreement.id='" + $G.test + "'" where $G.test is a date/time.