4D v14.3

USE SET

Home

 
4D v14.3
USE SET

USE SET 


 

USE SET ( set ) 
Parameter Type   Description
set  String in Name of the set to use

USE SET makes the records in set the current selection for the table to which the set belongs.

When you create a set, the current record is “remembered” by the set. USE SET retrieves the position of this record and makes it the new current record. If you delete this record before you execute USE SET, 4D selects the first record in the set as the current record. The set commands UNION, INTERSECTION, DIFFERENCE and ADD TO SET reset the current record. Also, if you create a set that does not contain the position of the current record, USE SET selects the first record in the set as the current record.

WARNING: Remember that a set is a representation of a selection of records at the moment that the set is created. If the records represented by the set do change, the set may no longer be accurate. Therefore, a set saved to disk should represent a group of records that does not change frequently. A number of things can invalidate a set invalid: modifying a record of the set, deleting a record of the set, or changing the criteria that determined the set.

Example  

The following example uses LOAD SET to load a set of the Acme locations in New York. It then uses USE SET to make the loaded set the current selection:

 LOAD SET([Companies];"NY Acme";"NYAcmeSt") ` Load the set into memory
 USE SET("NY Acme") ` Change current selection to NY Acme
 CLEAR SET("NY Acme") ` Clear the set from memory

 
PROPERTIES 

Product: 4D
Theme: Sets
Number: 118

This command changes the currrent recordThe command changes the current selection

 
HISTORY 

Created: < 4D v6

 
SEE ALSO 

CLEAR SET
LOAD SET

 
ARTICLE USAGE

4D Language Reference ( 4D v12.4)
4D Language Reference ( 4D v11 SQL Release 6)
4D Language Reference ( 4D v14 R3)
4D Language Reference ( 4D v14 R2)
4D Language Reference ( 4D v13.5)
4D Language Reference ( 4D v14.3)
4D Language Reference ( 4D v14 R4)