| 4D v20WP Get formulas | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 
 | 
    4D v20
 WP Get formulas 
         | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| WP Get formulas ( targetObj ) -> Function result | ||||||||
| Parameter | Type | Description | ||||||
| targetObj | Object |   | Range or element or 4D Write Pro document | |||||
| Function result | Collection |   | Collection of formulas | |||||
The WP Get formulas command returns a collection of all formulas defined in targetObj.
In the targetObj parameter, you can pass:
Note: When you pass a section in targetObj, only image formulas or formulas in text boxes anchored to this section or all sections are returned. If anchored to a page or to the embedded view, their formulas are not returned. Pass the document in targetObj to get all anchored element formulas.
Returned value
WP Get formulas returns a collection of formula objects, each of them containing one or more of the following properties:
| Property | Type | Description | 
| [ ].formula | Object | The formula string is available through [ ].formula.source. The formula is a copy of the formula found in the target. If you want to modify the formula, it must be re-inserted in the document to be taken into account | 
| [ ].range | Object | Range of the formula (not returned for anchored picture formulas) | 
| [ ].anchoredID | Text | ID of anchored picture (returned for anchored picture formulas only) | 
| [ ].owner | Object | 4D Write Pro document | 
Notes:
To get all formulas in a document:
 C_COLLECTION($formulas)
 $formulas:=WP Get formulas(WriteProArea)
To get all formulas in the first section of a document:
 C_COLLECTION($formulas)
 $formulas:=WP Get formulas(WP Get section(WriteProArea;1))
To get the formulas of all anchored pictures in a document:
 C_COLLECTION($formulas)
 $formulas:=WP Get formulas(WriteProArea).query("anchoredID # null")
									Managing formulas
									
									WP COMPUTE FORMULAS
									
									WP FREEZE FORMULAS
									
									WP Get links
									
									WP INSERT FORMULA
									
	Product:  4D
	Theme:  4D Write Pro Language
	Number:  
        1702
        
        
        
	
	Created:  4D v18 R2
	
	4D Write Pro Reference ( 4D v20)
 Add a comment
Add a comment