There are two "Search Editors" in version 5.0. The original "4D Editor" and the current " jit Search Editor".
Play Movie: t4_Searc.MOV
Search Scripts, how to create them
Play Movie: t5_Searc.MOV
Index Search Editor
Play Movie: t6_Index.MOV
The File being searched is listed at the Top left of the screen, [Customer] in this example.
The File may be changed if you are at the "Splash Screen" level.
The File number is listed to the right of the File name.
Press on the "File" ([Cusotmers]) and a Popup will show all the files in the database.
Selecting a different File will cause the Fields in that File to be displayed in the "Field List" down the right side of the window.
The "Field List" is displayed on the left side of the window.
Changing the File will cause the list of Fields to change.
The Data Type, index notation and Field number are shown to the right.
DT Fields will display a calculator to specify both a beginning and end date. Two lines will be entered, one may be deleted if desired.
The Search Criteria is listed in the top right of the window.
Double clicking on a Field will enter it into the "Search Criteria Editor".
To select a line in the "Criteria" window click in the "Value" column.
To change the Field, click in the "Value" field to select a Line and click on the "Replacement" Field.
Add, Insert and Delete Search lines by clicking on the buttons at the bottom of the "Entry" area.
Popup menus set the condition and relative value to be Searched for.
The Sets buttons allows to manage the Search relative to the current selection in the current file.
The popup must be selected prior to building the search.
Change been options by clicking on the popup and choosing the desired selection. In the following explanations, the gray box illustrates the result of the search and set operation.
New Selection Searching the database will result in a new selection of Items being made without reguard for the current selection.
Search Selection Searches for matches to the Search criteria within the current selection of records. The number of records in the current selection is displayed in the right center of the window.
Union The current selection is maitained, the Search will find a new selection and return the combination of both the original and new selections.
Intersection Search for values and return only the values that were in both the original selection and the new selection.
Difference Search for values and return only the values that are not in both the original and new selections.
Reverse Search for values and then return all records which do not meet that Search Criteria
Building and Executing Searches
Build button causes the Search pattern to be build without being Executed.
Execute button will cause the Search to be Executed.
If a Search has not be created and "Execute" is clicked, the old "4D Search Editor" will open.
If the Search has not be build from the "Edit" window, the "Execute" button will build the Search and Execute the Search.
If the "Search" area has a pattern in it, a Search will be executed without changing the existing script.
Results will be displayed in the "Records in Selection" value.
All button creates a selection of all records in the file.
If the Search has not be build from the Edi window, the" Execute" button will build the Search.
The Script area displays the Search that will be executed.
This "Script" area can be modified by the user.
Scripts may be copied or saved for use in the "Report Editors" or" SuperReports".
The Clipboard is used to copy the "Script" area onto the clipboard.
New, Save and Delete buttons on the right are used to "Add", "Save" and "Delete Search" Scripts.
Examples of Scripts verse Values for Searching:
(see the language reference for additional scripting examples)
Formulas and Values Searches
If you type an “=” sign as the first character of the Search value, the program will interpret that you wish to evaluate the criteria as a formula.
Typical formulas are:
Current Date the current date of the computer.
Current Date-30 the current computer date minus 30 days.
Date is a specified date or current date for the first of the week, 1 for the end of the week.
Date is a specified date or current date 0 for the first of the month, 1 for the end of the month.
Date is a specified date or current date 0 for the first of the quarter, 1 for the end of the quarter.
Date is a specified date or current date 0 for the first of the year, 1 for the end of the year.
Many other Search formulas can be created.
NOTE: Dates typed into formulas must have the correct designators, ie !01/15/97!.
Index Search Editor
The search by index window displays only the indexed fields for a file, is limited to a single value search or may execute a predefined complex search.
This window is designed to be simple to operate.
The key equivalent to this window is Command I.
4D Search Editors
The 4D search editor may be accessed through the Show current selection editor, holding down the Shift key while clicking on the Search button.