When the solution matters

Tips...

Registration Documentation Knowledgebase Seminars / Training Partner Programs 4D Partner Central

Step 6) Selections

Prerequisites

About Selections

When managing data, you select the group of records with which you want to work. This group of records is called the current selection. The current selection can contain none, one, some, or all records in a table. Every table has a current selection of records.

The current selection is an important concept in 4th Dimension. The most common data management operations are performed on the records in the current selection. These operations include:

The current selection of records is always the set of records most recently selected. For instance, you might have a company database that uses an employees table to keep track of employee records. Suppose that you decide to search for the records of all engineers in the company.

When this query begins, the current selection may contain the records of all employees in the company - salespeople, production personnel, engineers, and so on. When the query is completed, the current selection contains only the engineer’s records.

If you were to print a list of record, the list would contain only the records in the current selection - in this case, the records for all of the engineers in the company. If you were to graph the employee salaries, your graph would display the salaries for all of the engineers in the company.

The current selection remains the same until you perform an operation that changes it. You change the selection of records in a table whenever you select records manually or do a query that selects records. Search operations are performed by menu commands in the Queries menu, such as Query by Example, which searches for records based on the entries you specify for fields in a form.

To restore the current selection to all of the records in the table, you choose Show All from the Queries menu.

Learning Resources

4D QuickStart Guide
Good introduction to creating a simple database and performing basic operations with the User Environment, including working with selections.

4D User Reference
Chapters 4 and 5 (Selecting Records, Working with Records). Discusses the various ways of selecting records in the User Environment.

Commands and Topics for Selection
4D Language Reference, Chapter 43. Discusses the commands in the language used to manipulate the current selection.


International | Company | Contact 4D | Site Map | Privacy Policy | © 4D, Inc. 1995-2008 | Change font size: [A] [A] [A] | Print this page | 4D RSS Feeds