4D View v14

PV SET CELL NAME

Home

 
4D View v14
PV SET CELL NAME

PV SET CELL NAME 


 

PV SET CELL NAME ( area ; column ; row ; name ; mode ) 
Parameter Type   Description
area  Longint in 4D View area
column  Longint in Cell column number
row  Longint in Cell row number
name  String in Cell name
mode  Longint in 0 or omitted = Add the name, 1 = Replace the name

The PV SET CELL NAME command sets the name of a cell defined using the column and row parameters.

You can access a cell either by its absolute reference — column and row numbers — or its name. The 4D View area formulas can also refer to this cell using its name.

Notes:

  • The first three characters of a cell name must not be numbers.
  • The cell name must not contain spaces (any spaces contained in the name parameter will be truncated by the command).

The optional mode parameter is used to set the way the new cell name must be set if the cell already has one or more name(s). You can use the following constants of the PV Cell properties theme:

Constant Type Value Comment
pv add name Longint 0 The new name is added to any names already set for the cell
pv replace name Longint 1 The new name replaces any names that have already been set for the cell.
To delete all the names associated with a cell, pass an empty string ("") in name and pv replace name in mode.

Example  

This example allows changing the name of the current cell. If it has already a name, the user can replace it:

 C_TEXT($CellName`Name to assign to cell
 C_LONGINT($Column`Column number of current cell
 C_LONGINT($Row`Row number of current cell
 
 PV GET CURRENT CELL(Area;$Column;$Row`Get current cell coordinates
 $CellName:=PV Get cell name(Area;$Column;$Row`Name possibly given already
 
 If($CellName="") `The cell already has a name?
    $CellName:=Request("What name do you want to assign to this cell?";"New name")
    If($CellName#"") `A name was entered
       PV SET CELL NAME(Area;$Column;$Row;$CellName`Assign entered name
    End if
 Else `Current cell already has a name
    CONFIRM("This cell is already named "+$CellName+". Do you want to rename it?";"Yes";"No")
    If(OK=1) `The user wants to rename the cell
       PV SET CELL NAME(Area;$Column;$Row;$CellName;pv replace name)
    End if
 End if

 
PROPERTIES 

Product: 4D View
Theme: PV Cell property
Number: 15923

 
HISTORY 

Modified: 4D View 2004.1

 
SEE ALSO 

PV Get cell name
PV GET CELL NAME LIST

 
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)