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: 1740214129808.605
1 2 0.5 3 Some random: 1740214129809.725
1 1 1 2 Some random: 1740214129811.982
1 2 0.5 3 Some random: 1740214129811.602
4 4 1 8 Some random: 1740214129813.610
4 4 1 8 Some random: 1740214129814.695
7 8 0.88 15 Some random: 1740214129814.938
1 2 0.5 3 Some random: 1740214129815.240
8 9 0.89 17 Some random: 1740214129816.952
4 5 0.8 9 Some random: 1740214129817.060
100 1 100 101 Some random: 1740214129918.590
100 1 100 101 Some random: 1740214129919.796
2 3 0.67 5 Some random: 1740214129820.715
1 1 1 2 Some random: 1740214129822.952
1 2 0.5 3 Some random: 1740214129821.975
10 10 1 20 Some random: 1740214129823.593
1 2 0.5 3 Some random: 1740214129823.219
1 1 1 2 Some random: 1740214129825.346
100 50 2 150 Some random: 1740214129876.201
1 2 0.5 3 Some random: 1740214129825.595
11 13 0.85 24 Some random: 1740214129826.495
23 44 0.52 67 Some random: 1740214129812.273
1 2 0.5 3 Some random: 1740214129833.054
1 3 0.33 4 Some random: 1740214129833.056
5 5 1 10 Some random: 1740214129836.440
20 20 1 40 Some random: 1740214129837.499
1 1 1 2 Some random: 1740214129837.472
1 2 0.5 3 Some random: 1740214129837.554
1 3 0.33 4 Some random: 1740214129837.240
1 2 0.5 3 Some random: 1740214129839.105
5 5 1 10 Some random: 1740214129843.823
10 2 5 12 Some random: 1740214129852.500
2 2 1 4 Some random: 1740214129845.563
5 4 1.25 9 Some random: 1740214129847.497
3 2 1.5 5 Some random: 1740214129848.957
1 2 0.5 3 Some random: 1740214129847.515
2 2 1 4 Some random: 1740214129849.428
5 5 1 10 Some random: 1740214129849.112
3 3 1 6 Some random: 1740214129850.946
22 100 0.22 122 Some random: 1740214129773.486
3 3 1 6 Some random: 1740214129858.412
1 2 0.5 3 Some random: 1740214129859.493
1 1 1 2 Some random: 1740214129860.263
1 0 0 1 Some random: 1740214129862.747
1 2 0.5 3 Some random: 1740214129861.023
1 1 1 2 Some random: 1740214129863.482
33 33 1 66 Some random: 1740214129864.936
545 556 0.98 1101 Some random: 1740214129854.578
545 556 0.98 1101 Some random: 1740214129854.664
3 6 0.5 9 Some random: 1740214129863.963
1 2 0.5 3 Some random: 1740214129866.831
20 10 2 30 Some random: 1740214129878.141
12 12 1 24 Some random: 1740214129868.603
7 5 1.4 12 Some random: 1740214129871.985
11 14 0.79 25 Some random: 1740214129867.827
1 2 0.5 3 Some random: 1740214129870.042
2 2 1 4 Some random: 1740214129872.752
1 2 0.5 3 Some random: 1740214129872.120
24 1 24 25 Some random: 1740214129897.089
13 13 1 26 Some random: 1740214129874.952
100 10 10 110 Some random: 1740214129965.852
2 2 1 4 Some random: 1740214129876.588
5 0 0 5 Some random: 1740214129882.045
0 1 0 1 Some random: 1740214129876.081
5 5 1 10 Some random: 1740214129878.898
2 2 1 4 Some random: 1740214129879.019
-2 2 -1 0 Some random: 1740214129876.947
8 9 0.89 17 Some random: 1740214129880.881
15 1 15 16 Some random: 1740214129895.221
1 1 1 2 Some random: 1740214129882.740
1 1 1 2 Some random: 1740214129883.094
1 1 1 2 Some random: 1740214129883.012
1 2 0.5 3 Some random: 1740214129883.674
45 5 9 50 Some random: 1740214129925.092
2 2 1 4 Some random: 1740214129885.892
2 2 1 4 Some random: 1740214129886.503
5 10 0.5 15 Some random: 1740214129882.815
3 2 1.5 5 Some random: 1740214129888.637
11 13 0.85 24 Some random: 1740214129886.928
22 22 1 44 Some random: 1740214129889.015
2 2 1 4 Some random: 1740214129890.779
1 2 0.5 3 Some random: 1740214129902.041
5 5 1 10 Some random: 1740214129904.158
6 125 0.05 131 Some random: 1740214129786.312
23 32312 0 32335 Some random: 1740214097616.799
1 1 1 2 Some random: 1740214129906.057
1 2 0.5 3 Some random: 1740214129906.107
2 2 1 4 Some random: 1740214129920.353
100 200 0.5 300 Some random: 1740214129821.964
2 2 1 4 Some random: 1740214129923.323
3 5 0.6 8 Some random: 1740214129921.717
3 4 0.75 7 Some random: 1740214129923.906
1 2 0.5 3 Some random: 1740214129924.872
1 2 0.5 3 Some random: 1740214129925.596
5 8 0.62 13 Some random: 1740214129924.112
3 8 0.38 11 Some random: 1740214129922.218
1 1 1 2 Some random: 1740214129929.264
5 3 1.67 8 Some random: 1740214129931.662
10 5 2 15 Some random: 1740214129935.068
1 2 0.5 3 Some random: 1740214129930.083
2 2 1 4 Some random: 1740214129931.624
2 123 0.02 125 Some random: 1740214129811.389
480 60 8 540 Some random: 1740214130353.431
300 20 15 320 Some random: 1740214130214.576
123 321 0.38 444 Some random: 1740214129738.980
6 509 0.01 515 Some random: 1740214129434.305
10 5 2 15 Some random: 1740214129942.082
([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: 1740214129850.857
3 4 0.75 7 Some random: 1740214129950.812
1 2 0.5 3 Some random: 1740214129951.642
3 3 1 6 Some random: 1740214129952.276
2 5 0.4 7 Some random: 1740214129950.679
25.00 25.00 1 50 Some random: 1740214129954.080
555 666 0.83 1221 Some random: 1740214129843.984
2 4 0.5 6 Some random: 1740214129953.374
2 3 0.67 5 Some random: 1740214129955.682
2 4 0.5 6 Some random: 1740214129955.856
1 1 1 2 Some random: 1740214129958.569
7,8 3,6 7 Expression: [(7,8 + 3,6)] could not be calculated, Too many numbers or variables Some random: 7.03909451320742151740214129964
55 40 1.38 95 Some random: 1740214129974.118
2 8 0.25 10 Some random: 1740214129963.934
3 4 0.75 7 Some random: 1740214129970.776
1 2 0.5 3 Some random: 1740214129971.937
3 4 0.75 7 Some random: 1740214129972.379
1 2 0.5 3 Some random: 1740214129974.119
20 10 2 30 Some random: 1740214129985.549
3 4 0.75 7 Some random: 1740214129975.870
4 5 0.8 9 Some random: 1740214129976.585
5 4 1.25 9 Some random: 1740214129979.579
1 1 1 2 Some random: 1740214129979.335
1 2 0.5 3 Some random: 1740214129978.056
5 5 1 10 Some random: 1740214129980.563
3 2 1.5 5 Some random: 1740214129982.762
1 0.30 3.33 1.3 Some random: 1740214129983.303
1 2 0.5 3 Some random: 1740214129981.963
1 3 0.33 4 Some random: 1740214129981.704
1 2 0.5 3 Some random: 1740214129983.928
5 20 0.25 25 Some random: 1740214129970.192
3 3 1 6 Some random: 1740214129985.694
4 2 2 6 Some random: 1740214129988.568
1 2 0.5 3 Some random: 1740214129985.221
2 3 0.67 5 Some random: 1740214129986.507
2 3 0.67 5 Some random: 1740214129987.436
3 4 0.75 7 Some random: 1740214129987.620
1 2 0.5 3 Some random: 1740214129988.596
7 3 2.33 10 Some random: 1740214129993.082
34 12 2.83 46 Some random: 1740214130012.887
2 3 0.67 5 Some random: 1740214129989.144
1 1 1 2 Some random: 1740214129991.615
12,56 2,44 12 Expression: [(12,56 + 2,44)] could not be calculated, Too many numbers or variables Some random: 12.13315190015156541740214130036
1 2 0.5 3 Some random: 1740214129991.907
10 5 2 15 Some random: 1740214129998.196
2 2 1 4 Some random: 1740214129994.278
4 5 0.8 9 Some random: 1740214129993.506
1 2 0.5 3 Some random: 1740214129994.845
3 5 0.6 8 Some random: 1740214129994.460
1 2 0.5 3 Some random: 1740214129995.636



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