4D v16.3

GET HIGHLIGHTED RECORDS

Home

 
4D v16.3
GET HIGHLIGHTED RECORDS

GET HIGHLIGHTED RECORDS 


 

GET HIGHLIGHTED RECORDS ( {aTable ;} setName ) 
Parameter Type   Description
aTable  Table in Table where the highlighted records will be read If omitted, table of the current form
setName  String in Set where the highlighted records will be stored

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")

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



See also 

HIGHLIGHT RECORDS

 
PROPERTIES 

Product: 4D
Theme: Selection
Number: 902

The OK variable is changed by the command

 
HISTORY 

Created: 4D 2004

 
ARTICLE USAGE

4D Language Reference ( 4D v16)
4D Language Reference ( 4D v16.1)
4D Language Reference ( 4D v16.2)
4D Language Reference ( 4D v16.3)