Command PV SET CELL VARIABLE

4D View

PV SET CELL VARIABLE

version 6.8


PV SET CELL VARIABLE (area; column; row; variable)

ParameterTypeDescription
areaLongint4D View area
columnLongintCell column number
rowLongintCell row number
variableStringVariable 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.