This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v19
VP Get formula by name
|
VP Get formula by name ( vpAreaName ; name {; scope} ) -> Function result | ||||||||
Parameter | Type | Description | ||||||
vpAreaName | Text |
![]() |
4D View Pro area form object name | |||||
name | Text |
![]() |
Name of the named range | |||||
scope | Number |
![]() |
Target scope (default=current sheet) | |||||
Function result | Object |
![]() |
Named formula or named range definition | |||||
The VP Get formula by name command returns the formula and comment corresponding to the named range or named formula passed in the name parameter, or null if it does not exist in the defined scope.
In vpAreaName, pass the name of the 4D View Pro area. If you pass a name that does not exist, an error is returned.
Pass the named range or named formula that you want to get in name. Note that named ranges are returned as formulas containing absolute cell references.
You can define where to get the formula in scope using either the sheet index (counting begins at 0) or the following constants:
Constant | Value | Comment |
vk current sheet | -1 | Designates current sheet of the 4D View Pro area (default) |
vk workbook | -2 | Designates the entire workbook of the 4D View Pro area. |
The returned object contains the following properties:
Property | Type | Description |
formula | Text | Text of the formula corresponding to the named formula or named range. For named ranges, the formula is a sequence of absolute coordinates. |
comment | Text | Comment corresponding to the named formula or named range |
$range:=VP Cell("ViewProArea";0;0)
VP ADD RANGE NAME("Total1";$range)
$formula:=VP Get formula by name("ViewProArea";"Total1")
//$formula.formula=Sheet1!$A$1
$formula:=VP Get formula by name("ViewProArea";"Total")
//$formula=null (if not existing)
Product: 4D
Theme: 4D View Pro Language
Number:
9558
Created: 4D v17 R4
4D View Pro Reference ( 4D v19)