This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v19.8
entitySelection.isOrdered( )
|
entitySelection.isOrdered () -> Result | ||||||||
Parameter | Type | Description | ||||||
Result | Boolean |
![]() |
True if the entity selection is ordered, False otherwise | |||||
The entitySelection.isOrdered( ) method returns true if the entity selection is ordered, and false if it is unordered.
Note: This method always returns true when the entity selection comes from a remote datastore.
For more information, please refer to the Ordered vs Unordered entity selections paragraph.
C_OBJECT($employees;$employee)
C_BOOLEAN($isOrdered)
$employees:=ds.Employee.newSelection(dk keep ordered)
$employee:=ds.Employee.get(714) // Gets the entity with primary key 714
//In an ordered entity selection, we can add the same entity several times (duplications are kept)
$employees.add($employee)
$employees.add($employee)
$employees.add($employee)
$isOrdered:=$employees.isOrdered()
If($isOrdered)
ALERT("The entity selection is ordered and contains "+String($employees.length)+" employees")
End if
Product: 4D
Theme: ORDA - EntitySelection
Created: 4D v17
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)