IF command

Used to conditionally execute a command if the specified test condition evaluates to true.


IF test command



Specifies a condition that must be met for the command specified in the command parameter to be executed.


Any valid ACLScript command.


The logic of the IF command differs from the IF parameter that is supported by most commands. The IF command determines whether the associated command runs or not, based on the value of the test expression. When the IF parameter is used, the command tests each record in the ACL table and executes the command on the records that meet the test.

In a script, you can enter a series of IF command tests and run different commands based on the result. The IF command can be use to test the value of a variable to determine if further processing should occur.


The following example executes the CLASSIFY command, if the v_counter variable is greater than ten:

IF v_counter > 10 CLASSIFY ON Customer_number

If your script included a dialog box with a checkbox control that creates the variable v_classify_checkbox, which allows the user to select the checkbox to display the CLASSIFY command, you could use the following command to run the CLASSIFY command only when the checkbox is selected:

IF v_classify_checkbox CLASSIFY ON Customer_number

(C) 2015 ACL Services Ltd. All Rights Reserved.