Skip to content

Commit d2d338f

Browse files
committed
Import doc from docusaurus
1 parent 18c58b4 commit d2d338f

File tree

121 files changed

+6096
-243
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+6096
-243
lines changed
Lines changed: 39 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,45 @@
1-
<!---->
21
# VP ADD FORMULA NAME
32

4-
Click [here](https://developer.4d.com/docs/ViewPro/commands/vp-add-formula-name) to access the documentation for this method.
3+
<!-- REF #_method_.VP ADD FORMULA NAME.Syntax -->
54

6-
<script type="text/javascript">
5+
**VP ADD FORMULA NAME** ( *vpAreaName* : Text ; *vpFormula* : Text ; *name* : Text { ; *options* : Object } )<!-- END REF -->
76

8-
alert("azeaze");
9-
// $("#__docusaurus").replaceWith($(".theme-doc-markdown"))
10-
window.location = "https://developer.4d.com/docs/ViewPro/commands/vp-add-formula-name/";
7+
<!-- REF #_method_.VP ADD FORMULA NAME.Params -->
118

9+
|Parameter|Type| |Description|
10+
|---|---|---|---|
11+
|vpAreaName| Text|->|4D View Pro area form object name|
12+
|vpFormula|Text|-> |4D View Pro formula
13+
|name|Text|->|Name for the formula|
14+
|options|Object|->|Options for the named formula|<!-- END REF -->
1215

13-
</script>
16+
## Description
17+
18+
The `VP ADD FORMULA NAME` command <!-- REF #_method_.VP ADD FORMULA NAME.Summary -->creates or modifies a named formula in the open document<!-- END REF -->.
19+
20+
>Named formulas created by this command are saved with the document.
21+
22+
In *vpAreaName*, pass the name of the 4D View Pro area. If you pass a name that does not exist, an error is returned.
23+
24+
Pass the 4D View Pro formula that you want to name in *vpFormula*. For detailed information about formula syntax, see [Formulas and Functions](../formulas.md) page.
25+
26+
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).
27+
28+
You can pass an object with additional properties for the named formula in *options*. The following properties are supported:
29+
30+
|Property |Type|Description|
31+
|---|---|---|
32+
|scope| Number| Scope for the formula. You can pass the sheet index (counting begins at 0) or use the following constants: <li>`vk current sheet`</li><li>`vk workbook`</li>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`).|
33+
|comment|Text|Comment associated to named formula
34+
35+
## Example
36+
37+
```4d
38+
VP ADD FORMULA NAME("ViewProArea";"SUM($A$1:$A$10)";"Total2")
39+
```
40+
41+
## See also
42+
43+
[Cell references](../formulas.md#cell-references)<br/>
44+
[VP Get formula by name](VP%20Get%20formula%20by%20name.md)<br/>
45+
[VP Get names](VP%20Get%20names.md)
Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,45 @@
1-
<!---->
21
# VP ADD RANGE NAME
32

4-
Click [here](https://developer.4d.com/docs/ViewPro/commands/vp-add-range-name) to access the documentation for this method.
3+
<!-- REF #_method_.VP ADD RANGE NAME.Syntax -->
54

5+
**VP ADD RANGE NAME** ( *rangeObj* : Object ; *name* : Text { ; *options* : Object } )<!-- END REF -->
6+
7+
<!-- REF #_method_.VP ADD RANGE NAME.Params -->
8+
9+
|Parameter|Type| |Description|
10+
|---|---|---|---|
11+
|rangeObj| Object|->|Range object |
12+
|name|Text|->|Name for the fomula|
13+
|options|Object|->|Options for the named formula|<!-- END REF -->
14+
15+
## Description
16+
17+
The `VP ADD RANGE NAME` command <!-- REF #_method_.VP ADD RANGE NAME.Summary -->creates or modifies a named range in the open document<!-- END REF -->.
18+
19+
>Named ranges created by this command are saved with the document.
20+
21+
In *rangeObj*, pass the range that you want to name and in *name*, pass the new name for the range. If the name is already used within the same scope, the new named range replaces the existing one. Note that you can use the same name for different scopes (see below).
22+
23+
You can pass an object with additional properties for the named range in *options*. The following properties are supported:
24+
25+
|Property |Type|Description|
26+
|---|---|---|
27+
|scope| Number| Scope for the range. You can pass the sheet index (counting begins at 0) or use the following constants: <li>`vk current sheet`</li><li>`vk workbook`</li>The scope determines whether a range name is local to a given worksheet (*scope*=sheet index or `vk current sheet`), or global across the entire workbook (*scope*=`vk workbook`).|
28+
|comment|Text|Comment associated to named range|
29+
30+
>* A named range is actually a named formula containing coordinates. `VP ADD RANGE NAME` facilitates the creation of named ranges, but you can also use the [`VP ADD FORMULA NAME`](VP%20ADD%20FORMULA%20NAME.md) method to create named ranges.
31+
> * Formulas defining named ranges can be retrieved with the [`VP Get formula by name`](VP%20Get%20formula%20by%20name.md) method.
32+
33+
## Example
34+
35+
You want to create a named range for a cell range:
36+
37+
```4d
38+
$range:=VP Cell("ViewProArea";2;10)
39+
VP ADD RANGE NAME($range;"Total1")
40+
```
41+
42+
## See also
43+
44+
[VP Get names](VP%20Get%20names.md)<br/>
45+
[VP Name](VP%20Name.md)
Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,45 @@
1-
<!---->
21
# VP ADD SELECTION
32

4-
Click [here](https://developer.4d.com/docs/ViewPro/commands/vp-add-selection) to access the documentation for this method.
3+
<!-- REF #_method_.VP ADD SELECTION.Syntax -->
54

5+
**VP ADD SELECTION** ( *rangeObj* : Object )<!-- END REF -->
6+
7+
<!-- REF #_method_.VP ADD SELECTION.Params -->
8+
9+
|Parameter|Type| |Description|
10+
|---|---|---|---|
11+
|rangeObj| Object|->|Range object |<!-- END REF -->
12+
13+
## Description
14+
15+
The `VP ADD SELECTION` command <!-- REF #_method_.VP ADD SELECTION.Summary -->adds the specified cells to the currently selected cells<!-- END REF -->.
16+
17+
In *rangeObj*, pass a range object of cells to add to the current selection.
18+
19+
>The active cell is not modified.
20+
21+
## Example
22+
23+
You have cells currently selected:
24+
25+
![](../../assets/en/ViewPro/cmd_vpAddSelection1.PNG)
26+
27+
The following code will add cells to your selection:
28+
29+
```4d
30+
$currentSelection:=VP Cells("myVPArea";3;4;2;3)
31+
VP ADD SELECTION($currentSelection)
32+
```
33+
34+
Result:
35+
36+
![](../../assets/en/ViewPro/cmd_vpAddSelection2.PNG)
37+
38+
## See also
39+
40+
[VP Get active cell](VP%20Get%20active%20cell.md)<br/>
41+
[VP Get selection](VP%20Get%20selection.md)<br/>
42+
[VP RESET SELECTION](VP%20RESET%20SELECTION.md)<br/>
43+
[VP SET ACTIVE CELL](VP%20SET%20ACTIVE%20CELL.md)<br/>
44+
[VP SET SELECTION](VP%20SET%20SELECTION.md)<br/>
45+
[VP SHOW CELL](VP%20SHOW%20CELL.md)
Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,42 @@
1-
<!---->
21
# VP ADD SHEET
32

4-
Click [here](https://developer.4d.com/docs/ViewPro/commands/vp-add-sheet) to access the documentation for this method.
3+
<!-- REF #_method_.VP ADD SHEET.Syntax -->
4+
**VP ADD SHEET** ( *vpAreaName* : Text )<br/>**VP ADD SHEET** ( *vpAreaName* : Text ; *index* : Integer )<br/>**VP ADD SHEET** ( *vpAreaName* : Text ; *sheet* : Integer ; *name* : Text )<!-- END REF -->
55

6+
<!-- REF #_method_.VP ADD SHEET.Params -->
7+
8+
|Parameter|Type| |Description|
9+
|---|---|---|---|
10+
|vpAreaName| Text|->|4D View Pro area form object name|
11+
|sheet|Integer|-> |Index of the new sheet|
12+
|name|Text|->|Sheet name|<!-- END REF -->
13+
14+
## Description
15+
16+
The `VP ADD SHEET` command <!-- REF #_method_.VP ADD SHEET.Summary -->inserts a sheet in the document loaded in *vpAreaName*.<!-- END REF -->
17+
18+
In *vpAreaName*, pass the name of the 4D View Pro area.
19+
20+
In *sheet*, you can pass an index for the new sheet. If the passed *index* is inferior to or equal to 0, the command inserts the new sheet at the beginning. If *index* exceeds the number of sheets, the command inserts the new sheet after the existing ones.
21+
22+
>Indexing starts at 0.
23+
24+
In *name*, you can pass a name for the new sheet. The new name cannot contain the following characters: `*, :, [, ], ?,\,/`
25+
26+
## Example
27+
28+
The document currently has 3 sheets:
29+
30+
![vp-document-with-3-sheets](../../assets/en/ViewPro/vp-sheet-3.png)
31+
32+
To insert a sheet at the third position (index 2) and name it "March":
33+
34+
```4d
35+
VP ADD SHEET("ViewProArea";2;"March")
36+
```
37+
38+
![vp-add-sheet](../../assets/en/ViewPro/vp-add-sheet.png)
39+
40+
## See also
41+
42+
[VP REMOVE SHEET](VP%20REMOVE%20SHEET.md)
Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,46 @@
1-
<!---->
21
# VP ADD SPAN
32

4-
Click [here](https://developer.4d.com/docs/ViewPro/commands/vp-add-span) to access the documentation for this method.
3+
<!-- REF #_method_.VP ADD SPAN.Syntax -->
4+
**VP ADD SPAN** ( *rangeObj* : Object )<!-- END REF -->
55

6+
<!-- REF #_method_.VP ADD SPAN.Params -->
7+
8+
|Parameter|Type| |Description|
9+
|---|---|---|---|
10+
|rangeObj| Object|->|Range object|<!-- END REF -->
11+
12+
## Description
13+
14+
The `VP ADD SPAN` command combines the cells in *rangeObj* as a single span of cells.
15+
16+
In *rangeObj*, pass a range object of cells. The cells in the range are joined to create a larger cell extending across multiple columns and/or rows. You can pass multiple cell ranges to create several spans at the same time. Note that if cell ranges overlap, only the first cell range is used.
17+
18+
> * Only the data in the upper-left cell is displayed. Data in the other combined cells is hidden until the span is removed.
19+
> * Hidden data in spanned cells is accessible via formulas (beginning with the upper-left cell).
20+
21+
## Example
22+
23+
To span the First quarter and Second quarter cells across the two cells beside them, and the South area cell across the two rows below it:
24+
25+
![initial-document](../../assets/en/ViewPro/vp-add-span.png)
26+
27+
```4d
28+
// First quarter range
29+
$q1:=VP Cells("ViewProArea";2;3;3;1)
30+
31+
// Second quarter range
32+
$q2:=VP Cells("ViewProArea";5;3;3;1)
33+
34+
// South area range
35+
$south:=VP Cells("ViewProArea";0;5;1;3)
36+
37+
VP ADD SPAN(VP Combine ranges($q1;$q2;$south))
38+
```
39+
40+
![vp-add-span-result](../../assets/en/ViewPro/vp-add-span-2.png)
41+
42+
## See also
43+
44+
[4D View Pro Range Object Properties](../getting-started.md#using-range-objects)<br/>
45+
[VP Get spans](VP%20Get%20spans.md)<br/>
46+
[VP REMOVE SPAN](VP%20REMOVE%20SPAN.md)
Lines changed: 74 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,77 @@
1-
<!---->
21
# VP ADD STYLESHEET
32

4-
Click [here](https://developer.4d.com/docs/ViewPro/commands/vp-add-stylesheet) to access the documentation for this method.
3+
<!-- REF #_method_.VP ADD STYLESHEET.Syntax -->
4+
**VP ADD STYLESHEET** ( *vpAreaName* : Text ; *styleName* : Text ; *styleObj* : Object { ; *sheet* : Integer } )<!-- END REF -->
55

6+
<!-- REF #_method_.VP ADD STYLESHEET.Params -->
7+
8+
|Parameter|Type| |Description|
9+
|---|---|---|---|
10+
|vpAreaName| Text|->|4D View Pro area form object name|
11+
|styleName|Text|-> |Name of style|
12+
|styleObj|Object|->|Object defining attribute settings|
13+
|sheet|Integer|->|Sheet index (current sheet if omitted)|<!-- END REF -->
14+
15+
## Description
16+
17+
The `VP ADD STYLESHEET` command <!-- REF #_method_.VP ADD STYLESHEET.Summary -->creates or modifies the *styleName* style sheet based upon the combination of the properties specified in *styleObj* in the open document<!-- END REF -->. If a style sheet with the same name and index already exists in the document, this command will overwrite it with the new values.
18+
19+
> Style sheets created by this command are saved with the document.
20+
21+
In *vpAreaName*, pass the name of the 4D View Pro area. If you pass a name that does not exist, an error is returned.
22+
23+
The *styleName* parameter lets you assign a name to the style sheet. If the name is already used within the same scope, the new style sheet replaces the existing one. Note that you can use the same name for different scopes (see below).
24+
25+
Within the *styleObj*, designate the settings for the style sheet (e.g., font, text decoration, alignment, borders, etc.). For the full list of style properties, see [Style object properties](../configuring.md#style-object-properties).
26+
27+
You can designate where to define the style sheet in the optional *sheet* parameter using the sheet index (indexing starts at 0) or with the following constants:
28+
29+
* `vk current sheet`
30+
* `vk workbook`
31+
32+
If a *styleName* style sheet is defined at the workbook level and at a sheet level, the sheet level has priority over the workbook level when the style sheet is set.
33+
34+
To apply the style sheet, use the [VP SET DEFAULT STYLE](VP%20SET%20DEFAULT%20STYLE.md) or [VP SET CELL STYLE](VP%20SET%20CELL%20STYLE.md) commands.
35+
36+
## Example
37+
38+
The following code:
39+
40+
```4d
41+
$styles:=New object
42+
$styles.backColor:="green"
43+
44+
//Line Border Object
45+
$borders:=New object("color";"green";"style";vk line style medium dash dot)
46+
47+
$styles.borderBottom:=$borders
48+
$styles.borderLeft:=$borders
49+
$styles.borderRight:=$borders
50+
$styles.borderTop:=$borders
51+
52+
VP ADD STYLESHEET("ViewProArea";"GreenDashDotStyle";$styles)
53+
54+
//To apply the style
55+
VP SET CELL STYLE(VP Cells("ViewProArea";1;1;2;2);New object("name";"GreenDashDotStyle"))
56+
```
57+
58+
will create and apply the following style object named *GreenDashDotStyle*:
59+
60+
```
61+
{
62+
backColor:green,
63+
borderBottom:{color:green,style:10},
64+
borderLeft:{color:green,style:10},
65+
borderRight:{color:green,style:10},
66+
borderTop:{color:green,style:10}
67+
}
68+
```
69+
70+
## See also
71+
72+
[4D View Pro Style Objects and Style Sheets](../configuring.md#style-objects--style-sheets)<br/>
73+
[VP Get stylesheet](VP%20Get%20stylesheet.md)<br/>
74+
[VP Get stylesheets](VP%20Get%20stylesheets.md)<br/>
75+
[VP REMOVE STYLESHEET](VP%20REMOVE%20STYLESHEET.md)<br/>
76+
[VP SET CELL STYLE](VP%20SET%20CELL%20STYLE.md)<br/>
77+
[VP SET DEFAULT STYLE](VP%20SET%20DEFAULT%20STYLE.md)

Documentation/Methods/VP All.md

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,37 @@
1-
<!---->
21
# VP All
32

4-
Click [here](https://developer.4d.com/docs/ViewPro/commands/vp-all) to access the documentation for this method.
3+
<!-- REF #_method_.VP All.Syntax -->
4+
**VP All** ( *vpAreaName* : Text { ; *sheet* : Integer } ) : Object<!-- END REF -->
55

6+
<!-- REF #_method_.VP All.Params -->
7+
8+
|Parameter|Type| |Description|
9+
|---|---|---|---|
10+
|vpAreaName| Text|->|4D View Pro area form object name|
11+
|sheet|Integer|->|Sheet index (current sheet if omitted)|
12+
|Result|Object|<-|Range object of all cells|<!-- END REF -->
13+
14+
## Description
15+
16+
The `VP ALL` command <!-- REF #_method_.VP All.Summary -->returns a new range object referencing all cells<!-- END REF -->.
17+
18+
In *vpAreaName*, pass the name of the 4D View Pro area. If you pass a name that does not exist, an error is returned.
19+
20+
In the optional *sheet* parameter, you can designate a specific spreadsheet where the range will be defined (counting begins at 0). If omitted or if you pass `vk current sheet`, the current spreadsheet is used.
21+
22+
## Example
23+
24+
You want to define a range object for all of the cells of the current spreadsheet:
25+
26+
```4d
27+
$all:=VP All("ViewProArea") // all cells of the current sheet
28+
```
29+
30+
## See also
31+
32+
[VP Cell](vp-cell)<br/>
33+
[VP Cells](vp-cells)<br/>
34+
[VP Column](VP%20Column.md)<br/>
35+
[VP Combine ranges](VP%20Combine%20ranges.md)<br/>
36+
[VP Name](VP%20Name.md)<br/>
37+
[VP Row](VP%20Row.md)

0 commit comments

Comments
 (0)