Skip to content

Selection Criteria

When the first checkbox at the options wizard page is checked, you will see a wizard page in which you may specify a record selection formula.

Field Names List

This list shows the field names of the main file from which records are about to be read. The wizard limits the selection of fields to the fields of the main file. Once you click on a different field in this list, you will be prompted with the field selection criteria panel.

Formula Editor

This editor shows you the Database Export wizard record selection formula. The file and field names are not used, but the internal DataFlex representation (e.g., customer.name could be |FS22,3). This way, the whole selection can be handled by one function call to the EVAL() function.

When you try to enter the formula editor, you will see a question regarding modifying formulas. By default, the NO button is selected because modifying the formula should only be done by experts. Experienced users can skip the question by adding or changing the registry value for ConfirmFormulaEditor. It should be a DWORD value, and when it is ZERO, the question will be skipped, allowing you to enter the editor without a warning.

And Button

This button will insert the keyword "And" into the selection expression formula without you having to go to the editor and typing in the word yourself. It will always be placed at the end of the selection expression.

Or Button

This button will add or insert the keyword "OR" into the record selection formula. Entering or changing the formula yourself is also possible. It will always be placed at the end of the selection expression.

Check Button

A formula needs to be checked before you may continue to the next wizard page. The wizard will try via the DataFlex EVAL function to see if any errors appear. If the selection formula validation fails, the next button will not become active. This is done to avoid errors during export.

Record Selection Criteria

This panel helps you specify the correct selection criteria. In this panel, the field name is shown, while the record selection panel shows the internal representation of the field.

The panel shows the field name, its length, and field type. Via an operator radio group, you can pick the record selection operator, and in the select value field, you can enter the value to select on. String fields should be enclosed between a pair of single or double quotes. With the OK button, you will add the entered data to the formula editor, while the Cancel button will reverse the changes. The Browse Data button will bring you a data sample panel.

Field Name

The field name is shown in a grayed-out form because you cannot and should not be able to edit the field name. It is shown for informative purposes.

Operator Radio Group

The operator to be used must be selected from this radio group. Any other variants that DataFlex offers are not supported by the Database Export Wizard.

Operator Explanation
Eq Field contents must be equal to the value specified
Ne Field contents may not be equal to the value specified
Gt Field contents must be greater than the value specified
Lt Field contents must be less than the value specified
Ge Field contents must be greater than or equal to the value specified
Le Field contents must be less than or equal to the value specified
Contains Field contents containing the specified value make the record selected.

Selection Value

In this form, you should enter the selection value used for the currently pointed field. A selection value must match the field type and the DataFlex EVAL function rules.

Samples

  • "Data Access Worldwide" // With String EQ
  • 123.45 // With Numeric
  • "orld" // With String CONTAINS
  • "12/31/2000" // With Date

Field Type

The field type is shown in a grayed-out form and helps you enter a correct value in the selection value form.

Field Length

This grayed-out field shows the field length, which helps you enter a correct value in the selection value form.

OK Button

This button will close the record selection panel and add the entered values to the end of the formula editor. When this is the second or higher expression, you should first add an AND or an OR statement in the expression.

Cancel Button

This button will close the current record selection panel, and choices are discarded. You can therefore always open this panel and, in case of a mistake, close it again. Nothing wrong will happen.

Browse Data Button

The Browse Data button will bring you to the sample data dialog. In this panel, record samples are shown.

Sample Data Dialog

This panel can be used to see what data is in the file for the currently selected field. It is a sample of your data, which means that when the number of records becomes larger, not all records are listed. The sample data is retrieved in a random order, sorted just before this panel appears.

The number of records listed can be managed by setting or adding the DWORD registry key value MaxSampleDataRecCount. When the value of this registry entry is larger than the current number of records in the data file, it will be set to the current maximum. When this registry value is not present, the number of sample records is 50.

By clicking the COPY button, the currently selected line will be put in the clipboard buffer, allowing you to use the exact value in the record selection value from the calling panel.