4D v13PV SORT MANY |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D View v13
PV SORT MANY
|
PV SORT MANY ( area ; left ; top ; right ; bottom ; direction ; keys ; order ) | ||||||||
Parameter | Type | Description | ||||||
area | Longint |
![]() |
4D View area | |||||
left | Longint |
![]() |
Left column number | |||||
top | Longint |
![]() |
Top row number | |||||
right | Longint |
![]() |
Right column number | |||||
bottom | Longint |
![]() |
Bottom row number | |||||
direction | Integer |
![]() |
0 = Row; 1 = Column | |||||
keys | Array |
![]() |
Column(s) or row(s) containing the values to sort | |||||
order | Array |
![]() |
Sort directions: 0 = Ascending; 1 = Descending | |||||
The PV SORT MANY command is similar to PV SORT ONE but with multi-sort. You must pass columns or rows serving as sort criteria in key and the order (ascending or descending) in which the sorts will be executed in order.
The sort is executed in the cell selection delimited by left, top, right, and bottom.
direction indicates if the sort should arrange rows or columns:
Sort a cell selection (5 columns x 9 rows) in relation to the second column as the first ascending criteria and in the third column as the second descending criteria.
ARRAY LONGINT($Keys;2) `Column(s) or row(s) containing values to sort
ARRAY INTEGER($Orders;2) `0=Ascending / 1=Descending
`Initialization
$Keys{1}:=3 `The 2nd column of the selection serves as 1st sort criteria
$Keys{2}:=4 `The 3rd column of the selection serves as the 2nd sort criteria
$Orders{1}:=0 `Ascending sort for the rows of the 2nd column of the selection
$Orders{2}:=1 `Descending sort for the rows of the 3rd column of the selection
PV SORT MANY(Area;2;2;6;10;1;$Keys;$Orders)
Product: 4D
Theme: PV Cell manipulation
Number:
15974
Created: 4D View 6.8