GET HIGHLIGHTED RECORDS

4D - Documentation   Français   English   German   Spanish   4D v11 SQL, Command Theme List   4D v11 SQL, Command Alphabetical List   4D v11 SQL, Constant Theme List   Back   Previous   Next

version 2004


GET HIGHLIGHTED RECORDS ({aTable; }setName)

ParameterTypeDescription
aTableTableTable where the highlighted records will be read
If omitted, table of the current form
setNameStringSet where the highlighted records will be stored

Description

The GET HIGHLIGHTED RECORDS command stores in the set designated by the setName parameter the highlighted records (i.e., the records highlighted by the user in the list form) in the aTable passed as parameter. If the aTable parameter is omitted, the table of the current form or subform is used.

In Design mode or when executing the DISPLAY SELECTION / MODIFY SELECTION commands, this command can be replaced by calling the UserSet system set which is automatically maintained by 4D. However, since this command allows you to pick the table that will receive highlighted records, the GET HIGHLIGHTED RECORDS command can also manage record selections in subforms as well. In this case, subform selections can also come from different tables. For more information about the UserSet set, refer to the Sets section.

The GET HIGHLIGHTED RECORDS command can also be called in a non-form context; however, the returned set is empty.

The set designated by setName can be local/client, process or interprocess.

Note: In included subforms, the GET HIGHLIGHTED RECORDS command returns an empty set if the subform does not have the Multiple Selection Mode property. In this case, to find out the selected row, you must use the Selected record number command.

Example

This method indicates how many records are selected in the subform displaying the records of the [CDs] table:

   GET HIGHLIGHTED RECORDS ([CDs];"$highlight")
   ALERT(String(Records in set("$highlight"))"+" selected records.")
   CLEAR SET("$highlight")

See Also

HIGHLIGHT RECORDS.

System Variables or Sets

If the command was executed properly, the system variable OK is set to 1. Otherwise, it is set to 0.


4D - Documentation   Français   English   German   Spanish   4D v11 SQL, Command Theme List   4D v11 SQL, Command Alphabetical List   4D v11 SQL, Constant Theme List   Back   Previous   Next