Playground and DEMO space

This is a playground and demo space for ConfiForms and ConfiDoc addons developed and supported by Vertuna LLC

Most pages provide a storage format for the demo, so you can use the free add-on from Atlassian Confluence Source Editor (or through the bundled in ConfiForms storage editor) to import this configuration into your Confluence and see it in action

To import examples from the storage format on Confluence Cloud please see this page

Please note, all the examples here are provided without any obligation and may or may not be incomplete or may have bugs, and we provide NO SUPPORT for these examples and demos.

Here is a simple demo to show how the formula fields can be used 

We have 2 types of fields for calculations:

  • Calculated - which is calculated ONLY when the record is created
  • Formula - which is calculated and re-calculated each time the record is saved (created or updated)

You can use any of the functions or operations documented here: Supported math operators, formulas and functions

There is also a way to do calculations with ConfiForms Field Definition Rules


Here we have a simple form with 4 fields:

2 of number types and 3 of formula types

We have the following formulas in this form:

  • ([entry.f1] + [entry.f2])
  • (ROUND([entry.f1] / [entry.f2],2))
  • CONCAT("Some random: ", ((RANDOM() + [entry.f1] - [entry.f2] + NOW())))

Example configuration of a formula field:


Stored data

f1

f2

My formula 0

My formula 1

My formula 2

2 2 1 4 Some random: 1777340261855.657
1 2 0.5 3 Some random: 1777340261854.684
1 1 1 2 Some random: 1777340261856.629
1 2 0.5 3 Some random: 1777340261855.885
4 4 1 8 Some random: 1777340261857.270
4 4 1 8 Some random: 1777340261857.697
7 8 0.88 15 Some random: 1777340261857.843
1 2 0.5 3 Some random: 1777340261857.414
8 9 0.89 17 Some random: 1777340261857.157
4 5 0.8 9 Some random: 1777340261858.382
100 1 100 101 Some random: 1777340261958.229
100 1 100 101 Some random: 1777340261959.423
2 3 0.67 5 Some random: 1777340261859.484
1 1 1 2 Some random: 1777340261861.663
1 2 0.5 3 Some random: 1777340261860.654
10 10 1 20 Some random: 1777340261862.122
1 2 0.5 3 Some random: 1777340261861.482
1 1 1 2 Some random: 1777340261863.595
100 50 2 150 Some random: 1777340261913.294
1 2 0.5 3 Some random: 1777340261863.273
11 13 0.85 24 Some random: 1777340261862.836
23 44 0.52 67 Some random: 1777340261844.161
1 2 0.5 3 Some random: 1777340261864.518
1 3 0.33 4 Some random: 1777340261863.598
5 5 1 10 Some random: 1777340261866.958
20 20 1 40 Some random: 1777340261866.590
1 1 1 2 Some random: 1777340261867.300
1 2 0.5 3 Some random: 1777340261866.264
1 3 0.33 4 Some random: 1777340261866.092
1 2 0.5 3 Some random: 1777340261867.485
5 5 1 10 Some random: 1777340261869.118
10 2 5 12 Some random: 1777340261877.691
2 2 1 4 Some random: 1777340261869.687
5 4 1.25 9 Some random: 1777340261871.753
3 2 1.5 5 Some random: 1777340261871.853
1 2 0.5 3 Some random: 1777340261870.319
2 2 1 4 Some random: 1777340261871.311
5 5 1 10 Some random: 1777340261872.624
3 3 1 6 Some random: 1777340261872.504
22 100 0.22 122 Some random: 1777340261794.415
3 3 1 6 Some random: 1777340261873.412
1 2 0.5 3 Some random: 1777340261872.856
1 1 1 2 Some random: 1777340261874.632
1 0 0 1 Some random: 1777340261875.394
1 2 0.5 3 Some random: 1777340261873.642
1 1 1 2 Some random: 1777340261875.539
33 33 1 66 Some random: 1777340261875.311
545 556 0.98 1101 Some random: 1777340261865.659
545 556 0.98 1101 Some random: 1777340261865.048
3 6 0.5 9 Some random: 1777340261874.802
1 2 0.5 3 Some random: 1777340261876.054
20 10 2 30 Some random: 1777340261887.432
12 12 1 24 Some random: 1777340261878.407
7 5 1.4 12 Some random: 1777340261880.111
11 14 0.79 25 Some random: 1777340261876.571
1 2 0.5 3 Some random: 1777340261878.622
2 2 1 4 Some random: 1777340261879.155
1 2 0.5 3 Some random: 1777340261879.787
24 1 24 25 Some random: 1777340261903.485
13 13 1 26 Some random: 1777340261881.313
100 10 10 110 Some random: 1777340261971.851
2 2 1 4 Some random: 1777340261882.824
5 0 0 5 Some random: 1777340261887.100
0 1 0 1 Some random: 1777340261881.097
5 5 1 10 Some random: 1777340261883.894
2 2 1 4 Some random: 1777340261883.085
-2 2 -1 0 Some random: 1777340261879.108
8 9 0.89 17 Some random: 1777340261883.070
15 1 15 16 Some random: 1777340261898.245
1 1 1 2 Some random: 1777340261885.496
1 1 1 2 Some random: 1777340261885.688
1 1 1 2 Some random: 1777340261885.000
1 2 0.5 3 Some random: 1777340261885.247
45 5 9 50 Some random: 1777340261926.870
2 2 1 4 Some random: 1777340261887.793
2 2 1 4 Some random: 1777340261887.875
5 10 0.5 15 Some random: 1777340261882.236
3 2 1.5 5 Some random: 1777340261889.633
11 13 0.85 24 Some random: 1777340261886.544
22 22 1 44 Some random: 1777340261889.742
2 2 1 4 Some random: 1777340261889.539
1 2 0.5 3 Some random: 1777340261888.797
5 5 1 10 Some random: 1777340261890.561
6 125 0.05 131 Some random: 1777340261771.535
23 32312 0 32335 Some random: 1777340229602.611
1 1 1 2 Some random: 1777340261891.211
1 2 0.5 3 Some random: 1777340261890.746
2 2 1 4 Some random: 1777340261892.356
100 200 0.5 300 Some random: 1777340261792.544
2 2 1 4 Some random: 1777340261893.263
3 5 0.6 8 Some random: 1777340261891.503
3 4 0.75 7 Some random: 1777340261893.516
1 2 0.5 3 Some random: 1777340261893.880
1 2 0.5 3 Some random: 1777340261893.964
5 8 0.62 13 Some random: 1777340261892.644
3 8 0.38 11 Some random: 1777340261890.482
1 1 1 2 Some random: 1777340261896.715
5 3 1.67 8 Some random: 1777340261898.543
10 5 2 15 Some random: 1777340261901.232
1 2 0.5 3 Some random: 1777340261896.748
2 2 1 4 Some random: 1777340261897.346
2 123 0.02 125 Some random: 1777340261777.486
480 60 8 540 Some random: 1777340262318.460
300 20 15 320 Some random: 1777340262178.608
123 321 0.38 444 Some random: 1777340261701.319
6 509 0.01 515 Some random: 1777340261396.251
10 5 2 15 Some random: 1777340261905.237
([entry.f1] + [entry.f2]) ([entry.f1] + [entry.f2]) Expression: [(ROUND(([entry.f1] + [entry.f2]) / ([entry.f1] + [entry.f2]),2))] could not be calculated, Unknown operator '[' at position 9 Expression: [(([entry.f1] + [entry.f2]) + ([entry.f1] + [entry.f2]))] could not be calculated, Unknown operator '[' at position 3 Expression: [CONCAT("Some random: ", ((RANDOM() + ([entry.f1] + [entry.f2]) - ([entry.f1] + [entry.f2]) + NOW())))] could not be calculated, Unknown operator '[' at position 39
100 200 0.5 300 Some random: 1777340261801.697
3 4 0.75 7 Some random: 1777340261900.568
1 2 0.5 3 Some random: 1777340261900.717
3 3 1 6 Some random: 1777340261902.536
2 5 0.4 7 Some random: 1777340261899.183
25.00 25.00 1 50 Some random: 1777340261903.512
555 666 0.83 1221 Some random: 1777340261792.807
2 4 0.5 6 Some random: 1777340261902.718
2 3 0.67 5 Some random: 1777340261903.492
2 4 0.5 6 Some random: 1777340261903.366
1 1 1 2 Some random: 1777340261905.626
7,8 3,6 7 Expression: [(7,8 + 3,6)] could not be calculated, Too many numbers or variables Some random: 7.97461405899654651777340261911
55 40 1.38 95 Some random: 1777340261921.484
2 8 0.25 10 Some random: 1777340261900.643
3 4 0.75 7 Some random: 1777340261906.858
1 2 0.5 3 Some random: 1777340261906.766
3 4 0.75 7 Some random: 1777340261907.071
1 2 0.5 3 Some random: 1777340261907.809
20 10 2 30 Some random: 1777340261919.171
3 4 0.75 7 Some random: 1777340261908.625
4 5 0.8 9 Some random: 1777340261908.372
5 4 1.25 9 Some random: 1777340261911.319
1 1 1 2 Some random: 1777340261910.838
1 2 0.5 3 Some random: 1777340261910.969
5 5 1 10 Some random: 1777340261911.632
3 2 1.5 5 Some random: 1777340261913.804
1 0.30 3.33 1.3 Some random: 1777340261913.522
1 2 0.5 3 Some random: 1777340261911.652
1 3 0.33 4 Some random: 1777340261911.306
1 2 0.5 3 Some random: 1777340261912.015
5 20 0.25 25 Some random: 1777340261899.120
3 3 1 6 Some random: 1777340261914.805
4 2 2 6 Some random: 1777340261916.877
1 2 0.5 3 Some random: 1777340261914.235
2 3 0.67 5 Some random: 1777340261914.256
2 3 0.67 5 Some random: 1777340261915.155
3 4 0.75 7 Some random: 1777340261915.255
1 2 0.5 3 Some random: 1777340261916.270
7 3 2.33 10 Some random: 1777340261921.436
34 12 2.83 46 Some random: 1777340261940.419
2 3 0.67 5 Some random: 1777340261917.803
1 1 1 2 Some random: 1777340261918.787
12,56 2,44 12 Expression: [(12,56 + 2,44)] could not be calculated, Too many numbers or variables Some random: 12.99804853879504541777340261963
1 2 0.5 3 Some random: 1777340261918.555
10 5 2 15 Some random: 1777340261925.376
2 2 1 4 Some random: 1777340261920.746
4 5 0.8 9 Some random: 1777340261919.519
1 2 0.5 3 Some random: 1777340261920.618
3 5 0.6 8 Some random: 1777340261919.052
1 2 0.5 3 Some random: 1777340261921.876
12 10 1.2 22 Some random: 1777340261924.104
1 1 1 2 Some random: 1777340261923.731
1 2 0.5 3 Some random: 1777340261922.595
123 123 1 246 Some random: 1777340261924.694
2 2 1 4 Some random: 1777340261924.155
2 2 1 4 Some random: 1777340261925.199
1 1 1 2 Some random: 1777340261925.070
1 2 0.5 3 Some random: 1777340261925.341
5 3 1.67 8 Some random: 1777340261928.192
1 2 0.5 3 Some random: 1777340261926.122
10 5 2 15 Some random: 1777340261932.464
1 2 0.5 3 Some random: 1777340261926.601
88 8 11 96 Some random: 1777340262008.079
1 2 0.5 3 Some random: 1777340261927.946
1 2 0.5 3 Some random: 1777340261928.570
1 2 0.5 3 Some random: 1777340261928.815
10 2 5 12 Some random: 1777340261938.382
1 2 0.5 3 Some random: 1777340261929.272
`21 123 Expression: [(ROUND(`21 / 123,2))] could not be calculated, Unknown operator '`' at position 8 Expression: [(`21 + 123)] could not be calculated, Unknown operator '`' at position 2 Expression: [CONCAT("Some random: ", ((RANDOM() + `21 - 123 + NOW())))] could not be calculated, Unknown operator '`' at position 38
1 2 0.5 3 Some random: 1777340261930.929
4 2 2 6 Some random: 1777340261934.069
4 3 1.33 7 Some random: 1777340261933.418
5 2 2.5 7 Some random: 1777340261936.901
3 4 0.75 7 Some random: 1777340261932.070
1 1 1 2 Some random: 1777340261933.923
134 426 0.31 560 Some random: 1777340261642.974
12 12 1 24 Some random: 1777340261934.533
2 3 0.67 5 Some random: 1777340261934.884
10 20 0.5 30 Some random: 1777340261925.191
1 2 0.5 3 Some random: 1777340261935.615



Storage format for this demo:

<ac:structured-macro ac:macro-id="e44fca82-119b-4e79-b70a-1d521f0f13e3" ac:name="confiform" ac:schema-version="1">
  <ac:parameter ac:name="formName">myform1</ac:parameter>
  <ac:rich-text-body>
    <ac:structured-macro ac:macro-id="9930843c-b7ee-493d-b93d-6c91cf13da7a" ac:name="confiform-entry-register" ac:schema-version="1">
      <ac:parameter ac:name="embedded">true</ac:parameter>
      <ac:rich-text-body>
        <p>
          <br/>
        </p>
      </ac:rich-text-body>
    </ac:structured-macro>
    <p>
      <ac:structured-macro ac:macro-id="c1d112a1-145d-4822-9263-57e7f1d95202" ac:name="confiform-field-definition" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">f1</ac:parameter>
        <ac:parameter ac:name="fieldLabel">f1</ac:parameter>
        <ac:parameter ac:name="type">number</ac:parameter>
        <ac:parameter ac:name="required">true</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>
      <ac:structured-macro ac:macro-id="5b285aed-c238-42cb-8fb0-74b504f51edd" ac:name="confiform-field-definition" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">f2</ac:parameter>
        <ac:parameter ac:name="fieldLabel">f2</ac:parameter>
        <ac:parameter ac:name="type">number</ac:parameter>
        <ac:parameter ac:name="required">true</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>
      <ac:structured-macro ac:macro-id="9981f97b-d090-401d-95d2-b19d45a4df9f" ac:name="confiform-field-definition" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">myformula1</ac:parameter>
        <ac:parameter ac:name="fieldLabel">My formula 1</ac:parameter>
        <ac:parameter ac:name="extras">([entry.f1] + [entry.f2])</ac:parameter>
        <ac:parameter ac:name="type">formula</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>
      <ac:structured-macro ac:macro-id="f6b5b3d7-3462-4068-b23c-2ccee3789f66" ac:name="confiform-field-definition" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">myformula2</ac:parameter>
        <ac:parameter ac:name="fieldLabel">My formula 2</ac:parameter>
        <ac:parameter ac:name="extras">CONCAT("Some random: ", ((RANDOM() + [entry.f1] - [entry.f2] + NOW())))</ac:parameter>
        <ac:parameter ac:name="type">formula</ac:parameter>
      </ac:structured-macro>
    </p>
  </ac:rich-text-body>
</ac:structured-macro>
<p>Stored data</p>
<ac:structured-macro ac:macro-id="1d573801-7d23-412f-aa1e-c3c04d1fcc63" ac:name="confiform-table" ac:schema-version="1">
  <ac:parameter ac:name="formName">myform1</ac:parameter>
  <ac:rich-text-body>
    <p>
      <ac:structured-macro ac:macro-id="dc71204e-5341-4543-af04-45ab036c827d" ac:name="confiform-field" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">f1</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>
      <ac:structured-macro ac:macro-id="12af5c9f-b5bb-475e-b9c1-470d60b3bd6c" ac:name="confiform-field" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">f2</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>
      <ac:structured-macro ac:macro-id="0c76996a-654f-4b77-848b-9d8b2212a85f" ac:name="confiform-field" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">myformula1</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>
      <ac:structured-macro ac:macro-id="9a8cf996-366b-4a8b-be43-da01d32dc449" ac:name="confiform-field" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">myformula2</ac:parameter>
      </ac:structured-macro>
    </p>
  </ac:rich-text-body>
</ac:structured-macro>
  • No labels