Skip to main content
Version: 20 R6 BETA

VP ADD FORMULA NAME

VP ADD FORMULA NAME ( vpAreaName : Text ; vpFormula : Text ; name : Text { ; options : Object } )

ParameterTypeDescription
vpAreaNameText->4D View Pro area form object name
vpFormulaText->4D View Pro formula
nameText->Name for the formula
optionsObject->Options for the named formula

Description

The VP ADD FORMULA NAME command creates or modifies a named formula in the open document.

Named formulas created by this command are saved with the document.

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 4D View Pro formula that you want to name in vpFormula. For detailed information about formula syntax, see Formulas and Functions page.

Pass the new name for the formula in name. If the name is already used within the same scope, the new named formula replaces the existing one. Note that you can use the same name for different scopes (see below).

You can pass an object with additional properties for the named formula in options. The following properties are supported:

PropertyTypeDescription
scopeNumberScope for the formula. You can pass the sheet index (counting begins at 0) or use the following constants:
  • vk current sheet
  • vk workbook
  • The scope determines whether a formula name is local to a given worksheet (scope=sheet index or vk current sheet), or global across the entire workbook (scope=vk workbook).
    commentTextComment associated to named formula

    Example

    VP ADD FORMULA NAME("ViewProArea";"SUM($A$1:$A$10)";"Total2")

    See also

    Cell references
    VP Get formula by name
    VP Get names