This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com

Home

 
4D v19
VP Get formulas

VP Get formulas 


 

VP Get formulas ( rangeObj ) -> Function result 
Parameter Type   Description
rangeObj  Object in Range object
Function result  Collection in Collection of formula values

The VP Get formulas command retrieves the formulas from a designated rangeObj.

In rangeObj, pass a range whose formulas you want to retrieve. If rangeObj designates multiple ranges, the formula of the first range is returned. If rangeObj does not contain any formulas, the command returns an empty string.

The returned collection is two-dimensional: 

  • The first-level collection contains subcollections of formulas. Each subcollection reprensents a row.
  • Each subcollection defines cell values for the row. Values are text elements containing the cell formulas. 

 

Example  

You want to retrieve the formulas in the Sum and Average columns from this document:

You can use this code:

 $formulas:=VP Get formulas(VP Cells("ViewProArea";5;1;2;3))
  //$formulas[0]=[Sum(B2:D2),Average(B2:D2)]
  //$formulas[1]=[Sum(B3:D3),Average(B3:D3)]
  //$formulas[2]=[Sum(B4:D4),Average(C4:D4)]



See also 

VP Get formula
VP Get values
VP SET FORMULAS
VP SET VALUES

 
PROPERTIES 

Product: 4D
Theme: 4D View Pro Language
Number: 9775

 
PAGE CONTENTS 
 
HISTORY 

Created: 4D v17 R6

 
ARTICLE USAGE

4D View Pro Reference ( 4D v19)