version 2004 (Modified)
HIGHLIGHT RECORDS ({table}{; setName{; *}})
Parameter | Type | Description | |
table | Table | Table where records will be highlighted | |
If omitted, table of current form | |||
setName | String | Set of records to highlight or | |
Userset if omitted | |||
* | * | Disable the automatic scroll of the list |
Description
The HIGHLIGHT RECORDS command allows you to highlight records in a list form. This operation is identical to manually selecting records in list mode by using the mouse or the Shift+Click or Ctrl+Click (Windows) or Command+Click (Mac OS) key combinations.
The current selection is not modified.
Note: The set of "selected" records is updated after redrawing the records; that is, after executing the entire calling method and not just immediately after executing HIGHLIGHT RECORDS.
The table parameter lets you designate the table where records will be "highlighted." This parameter can be used, in particular, to highlight the records of included subforms which do not belong to the current table (see below).
If you pass a valid set name to setName, the command will be applied to the records in that set for the table defined.
If you omit the setName parameter, the command will only highlight the records in the current UserSet set. This set is only managed in User mode or when calling the MODIFY SELECTION / DISPLAY SELECTION commands. If you want to highlight the records of a subform, you must pass a table name and set name. For more information about the UserSet set, refer to the Sets section.
The * parameter, when passed, causes the disabling of the automatic scroll function of the list if the highlighted records are not visible. This mechanism authorizes customized scroll management using the new SCROLL LINES command.
Note: Regarding included subforms, the HIGHLIGHT RECORDS command does nothing if the Selection Mode property Multiple is not selected for the subform. In this case, to highlight a line, you should use the GOTO SELECTED RECORD command.
Example
In an output form displayed by the MODIFY SELECTION command, you want the user to be able to perform searches without the current selection being modified. To do this, place a Search button in the form and associate it with the following method:
SET QUERY DESTINATION(Into Set;"UserSet") QUERY SET QUERY DESTINATION(Into Current Selection) HIGHLIGHT RECORDS
When the user clicks the button, the standard query dialog box appears. Once the search has been validated, the records found will be highlighted without the current selection being modified.
See Also
GET HIGHLIGHTED RECORDS, SCROLL LINES.