4D View v14

PV GET CELL FIELD

Home

 
4D View v14
PV GET CELL FIELD

PV GET CELL FIELD 


 

PV GET CELL FIELD ( area ; column ; row ; numTable ; numField ) 
Parameter Type   Description
area  Longint in 4D View area
column  Longint in Cell column number
row  Longint in Cell row number
numTable  Integer in Table number
numField  Integer in Field number

The PV GET CELL FIELD command returns, in the table and field parameters, the number for tables and fields linked to the cell set by column and row.

Refer to the example for the PV SET CELL FIELD command.

The following example illustrates the use of the PV GET CELL FIELD command in a method enabling the sorting of dynamic columns when their header is clicked on. The area only contains dynamic columns. We begin by installing the EventMethod callback method that will be called in the event of a click in the area:

 PV ON EVENT(area;pv on clicked;"EventMethod")

This statement catches any clicks in the area. The EventMethod method will enable us to detect clicks in the column headers and to sort the data as a consequence.

  `EventMethod Method
 C_BOOLEAN($0)
 C_LONGINT($1;$2;$3;$4;$5;$6)
 C_INTEGER($tableNum;$fieldNum)
 
 If($5=0) `If the click takes place in a header
    $0:=True `Cancels the event
    PV GET CELL FIELD(area;$4;1;$tableNum;$fieldNum`Data to be sorted
    ORDER BY(Table($tableNum)->;Field($tableNum;$fieldNum)->;>) `Sorting 4D data
 End if `Linked values in the columns are automatically sorted

 
PROPERTIES 

Product: 4D View
Theme: PV Cell value
Number: 15913

 
HISTORY 

Created: 4D View 6.8

 
SEE ALSO 

PV Get cell value type
PV SET CELL FIELD

 
ARTICLE USAGE

4D View Language ( 4D View v11.4)
4D View Language ( 4D View v12)
4D View Language ( 4D v13)
4D View Language ( 4D View v14 R2)
4D View Language ( 4D View v14)
4D View Language ( 4D View v14 R3)
4D View Language ( 4D View v14 R4)