| 4D v13PV GET CELL FIELD | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 
 | 
    4D View v13
 PV GET CELL FIELD 
         | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PV GET CELL FIELD ( area ; column ; row ; numTable ; numField ) | ||||||||
| Parameter | Type | Description | ||||||
| area | Longint |   | 4D View area | |||||
| column | Longint |   | Cell column number | |||||
| row | Longint |   | Cell row number | |||||
| numTable | Integer |   | Table number | |||||
| numField | Integer |   | 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
	Product:  4D
	Theme:  PV Cell value
	Number:  
        15913
        
        
        
	
	Created:  4D View 6.8
PV Get cell value type
PV SET CELL FIELD