4D v14.3Displaying and selecting records |
||
|
4D v14.3
Displaying and selecting records
Displaying and selecting records
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 of the records in a table. Every table and every process has its own current selection of records. The current selection is an important concept in 4D. The most common data management operations are performed on the records in the current selection. These operations include:
In other words, creating a current selection in a table is the first step towards numerous other data management operations. 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. The current selection remains the same until you perform an operation that changes it. You can change the current selection by:
The title bar of the output form tells you how many records are in the current table and how many records from the table are in the current selection. 4D Server: In a remote 4D, only the number of records in the current selection is displayed. The control panel of certain input forms displays, under the navigation buttons, the number of the record selected and the total number of records in the current selection. The number of the record selected corresponds to its position in the current selection. Every table in a database has its own current selection. In a relational database, changing the current selection in one table can change the current selections in related tables. For example, in a database consisting of related [Employees] and [Departments] tables, a opening an input form in the [Departments] table changes the current selection in the [Employees] table. That is, the employees belonging to that department become the new current selection in the [Employees] table. For more information about relations, refer to Types of relations. If you use processes for carrying out tasks in the database, there may be several simultaneous current selections per table. Each process acts like an individual 4D environment, which lets you carry out separate tasks. It can be useful to have more than one current selection, particularly when you are comparing two or more types of data, such as the monthly invoicing of several different sales regions. For more information about processes, refer to Processes in the 4D Language Reference manual. When using an output form to display records, you can reset the current selection so that it contains all the records in the current table. In the Application environment, this operation could be carried out via the “Select All” standard action or the ALL RECORDS command of the 4D language. In the Design environment, you can use the Show All command from the Records menu. All the records of the current table are then included in the current selection. Note: The Show All command is disabled when you are using an input form. You can specify a new current selection in an output form by manually "marking" certain records, then defining them as the new current selection. This is referred to as creating a subset. In the Application environment, you manage records marked by users via commands for handling Sets and commands of the Selection theme. In the Design environment, there is a specific Show Subset command in the Records menu. When you select this command, 4D restricts the current selection to the records that have been selected (marked) manually in the window. The different ways of manually selecting records are described in the “Highlighting” section in Output forms. |
PROPERTIES
Product: 4D ARTICLE USAGE
4D Design Reference ( 4D v14 R2) |