Select test

<< Click to Display Table of Contents >>

Navigation:  Reference Manual > Windows and dialog boxes > Select test >

Select test

This appears when inserting or editing a test in a logic definition, for example when defining a filter.  See the "Tests" tab in the User control for logic definitions.

This is used to define a test.  A test is a part of a logic definition, see User guide, Project components, Logic definitions introduction.

For a full description of the types of definition that can be used, see Definitions, Logic definitions.

A test is a reference to an earlier entry that is either true or false.

Individual tests may be combined with AND (both) and OR (either or both) to form logic definitions.  Parentheses can be used to control the order of processing.

All tests can be "Negative" and this reverses the meaning - true will be false and false will be true.

The types of test that can be applied will depend on the type of entry that is being referenced:

Single-coded reference

When referring to single-coded questions or single-coded variables, the test can be:

Blank - true if the entry is empty, do not use when referring to entries with a reject category because they will never be blank

One value - true if this response number  has been selected

Range - true if any response number has been selected within the inclusive range

Equal to another entry - true if the value is the same as the value of another named entry

Less than another entry - true if the value less than the value of another named entry

More than another entry - true if the value greater than the value of another named entry

An empty single-coded entry has a value of 0 (zero).

Multi-coded reference

When referring to multi-coded questions or multi-coded variables, the test can be:

Blank - true if the entry is empty, do not use when referring to entries with a reject category because they will never be blank

One value - true if this response number has been selected

Range - true if one or more of the response numbers have been selected within the inclusive range

Single - true if only one response has been selected

Multi - true if more than one response has been selected

Integer reference (including date and time)

When referring to integer, date and time entries, the test can be:

Undefined - true if the entry is not set (skipped or faulty)

One value - true if the entry has this value

Less than - true if the entry has a value less than this

More than - true if the entry has a value greater than this

Range - true if the entry has a value within the inclusive range

Equal to another entry - true if the value is the same as the value of another named entry

Less than another entry - true if the value less than the value of another named entry

More than another entry - true if the value greater than the value of another named entry

An empty (undefined) integer entry has its value treated as a very large negative number when comparing values.

Float reference

When referring to float entries, value can be:

Undefined - true if the entry is not set (skipped or faulty)

One value - true if the entry has this value

Less than - true if the entry has a value less than this

More than - true if the entry has a value greater than this

Range - true if the entry has a value within the inclusive range

Equal to another entry - true if the value is the same as the value of another named entry

Less than another entry - true if the value less than the value of another named entry

More than another entry - true if the value greater than the value of another named entry

An empty (undefined) float entry has its value treated as a very large negative number when comparing values.

Be careful when using ranges on float entries.   For example the two ranges 1.0 to 2.0,and 3.0 to 4.0, would not include any value between 2.0 and 3.0 (2.1 or 2.9).  Usually you should create an integer variable copy which will round each value to the nearest whole number and use that instead.

Character reference

When referring to character questions, the test can be:

Blank - true if the question is empty

One value - true if the entry contains exactly this text

The case (upper or lower) of the text in quotes is important, except in a variable when you have set the option to ignore case when comparing.

If the text is shorter than the width of the question then the test will only be true if the rest of the entry is blank.

Filter reference

When referring to filter entries the test is true if the filter is true, and false if the filter is false.