This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v19.8
Create entity selection
|
Create entity selection ( dsTable {; settings} ) -> Function result | ||||||||
Parameter | Type | Description | ||||||
dsTable | Table |
![]() |
Table in the 4D database whose current selection will be used to build the entity selection | |||||
settings | Object |
![]() |
Build option: context | |||||
Function result | EntitySelection |
![]() |
Entity selection matching the dataclass related to the given table | |||||
The Create entity selection command builds and returns a new, alterable entity selection related to the dataclass matching the given dsTable, according to the current selection of this table.
Note: For more information, see Shareable vs Alterable entity selections.
If the current selection is sorted, an ordered entity selection is created (the order of the current selection is kept). If the current selection is unsorted, an unordered entity selection is created. For more information, please refer to the Ordered vs Unordered entity selections paragraph in the 4D Design Reference.
In the optional settings parameter, you can pass an object containing additional options. The following property is supported:
Property | Type | Description |
context | Text | Label for the optimization context applied to the entity selection. This context will be used by the code that handles the entity selection so that it can benefit from the optimization. This feature is designed for ORDA client/server processing; for more information, please refer to the Client/server optimization section. |
C_OBJECT($employees)
ALL RECORDS([Employee])
$employees:=Create entity selection([Employee])
// The $employees entity selection now contains a set of reference on all entities related to the Employee dataclass
Product: 4D
Theme: ORDA - EntitySelection
Number:
1512
Created: 4D v17
Modified: 4D v17 R5
4D Language Reference ( 4D v19)
4D Language Reference ( 4D v19.1)
4D Language Reference ( 4D v19.4)
4D Language Reference ( 4D v19.5)
4D Language Reference ( 4D v19.6)
4D Language Reference ( 4D v19.7)
4D Language Reference ( 4D v19.8)