version 6.8
PV SET CELL VARIABLE (area; column; row; variable)
| Parameter | Type | Description | |
| area | Longint | 4D View area | |
| column | Longint | Cell column number | |
| row | Longint | Cell row number | |
| variable | String | Variable name |
Description
The PV SET CELL VARIABLE command links the cell set by column and row to a variable. Any modifications to the cell content will affect the variable and vice-versa.
Example
The following form method displays the current time in cell C3 using the vTime variable. This variable is updated each second, such that the cell acts as a clock:
C_TIME(vTime) `Variable receiving displayed time Case of : (Form event=On Load ) If (PV Get cell variable (Area;3;3)="") `Still no variable associated with C3 PV SET CELL VARIABLE (Area;3;3;"vTime") `Associate the vTime variable End if SET TIMER(60) `Every second : (Form event=On Timer ) vTime:=Current time End case
See Also
PV ADD DYNAMIC ARRAYS, PV Get cell value type, PV Get cell variable, PV SET CELL FIELD.