Chapter 5 241
Storing and Retrieving Test Results
Customizing a Simple Test Database
6. The output of the Test Menu goes into a Formula object, which then
sends the correct formula to the
From Data Set object.
Select
Device ⇒ Formula, and place the object below Test Menu.
(You may want to rearrange and/or resize objects as you add items during
the exercise.) In the new
Formula object, enter the following expression:
"Rec.A==" + "\"" + A + "\""
For example, if test6 is selected, then the final formula will read
Rec.A=="test6". The From Data Set object then outputs the first
record it finds, whose
"A" field is equal to "test6".
7. Connect the
Test Menu Enum data output pin to the data input pin on
the
Formula object. Iconize the Formula object.
8. Connect the
Formula data output pin to the control input pin on the
From Data Set object labeled Formula.
9. To ensure that the old data from
Formula is not reused, delete the
sequence line between
For Count and From Data Set. Connect the
For Count sequence output pin to the Formula sequence input pin.
“Rec.A==”
"Rec.A==" sends a Text data type to the From
Data
Formula expression input. (The quotation
marks indicate a text string.)
A
VEE looks at the first field A of all records in the
DataSet file, and selects the first record that equals
the selected test name.
“\”” The escape character for a quotation mark is
\”. The
escape character is then put into quotes to indicate a
text string.
The test name comes from the
Test Menu as an
Enum data type. Quotes are required to put the
correct formula into the
From DataSet object.