Chapter 5 : Using Processes

5.2.7.Test and Branch

General introduction

The Test & Branch command allows you to set up a test and, depending

 

on the test result, branch to a specified screen or label.

 

 

Test and Branch

To test a variable and branch upon a condition, proceed as follows:

 

1

Add the process Test and Branch to your label program

 

2

In the If Value box, select the variable you want to test or type

 

3

any text.

 

Determine if you want to make a String or Numeric comparison

 

4

Select the comparison criteria.

 

5

In the Value 2 box, select the variable against which you want to

 

 

test the variable selected in the first parameter. You may also type

 

6

any text here instead of selecting a variable.

 

In the Then Goto box, select a screen or action to go to if the

 

7

comparison is true.

 

In the Else Goto box, select a screen or action to go to if the

 

8

comparison is false.

 

Click OK

String or numeric?

 

If you select String, the test will consider both values as ‘text' and

 

 

the operation will be purely a ‘text' field comparison.

Example: If the first variable contains 0002 and the second variable contains 2, the result of the ‘is equal to' will be ‘False'.

If you select Numeric, the test will be done on numeric values.

Example: If the first variable contains 0002 and the second variable contains 2, the result of the ‘is equal to' will be ‘True'.

www.mcl-collection.com

October 2007

Page 142

Copyright © 2007 • MCL Technologies • All Rights Reserved

 

 

Page 142
Image 142
Datamax v1.1x user manual Test and Branch, Select the comparison criteria, String or numeric?