Page tree
Skip to end of metadata
Go to start of metadata

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 to import this configuration into your Confluence and see it in action

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

3 7 0.43 10 Some random: 1642894767931.039
8 9 0.89 17 Some random: 1642894767935.095
9 8 1.12 17 Some random: 1642894767938.867
.2 .2 Expression: [(ROUND(.2 / .2,2))] could not be calculated, Unknown operator '.' at position 8 Expression: [(.2 + .2)] could not be calculated, Unknown operator '.' at position 2 Expression: [CONCAT("Some random: ", ((RANDOM() + .2 - .2 + NOW())))] could not be calculated, Unknown operator '.' at position 38
2 2 1 4 Some random: 1642894767938.484
1 2 0.5 3 Some random: 1642894767938.159
33 2 16.5 35 Some random: 1642894767971.291
1 32 0.03 33 Some random: 1642894767909.791
1 2 0.5 3 Some random: 1642894767940.359
1 2 0.5 3 Some random: 1642894767941.265
1 1 1 2 Some random: 1642894767942.134
4 1 4 5 Some random: 1642894767946.418
123 123 1 246 Some random: 1642894767944.223
2 2 1 4 Some random: 1642894767945.375
3 4 0.75 7 Some random: 1642894767945.382
3 4 0.75 7 Some random: 1642894767946.188
3 2 1.5 5 Some random: 1642894767948.682
33 32 1.03 65 Some random: 1642894767949.322
5 5 1 10 Some random: 1642894767949.701
3 4 0.75 7 Some random: 1642894767949.365
2 2 1 4 Some random: 1642894767950.958
1 2 0.5 3 Some random: 1642894767950.001
12 12 1 24 Some random: 1642894767952.385
.1 .2 Expression: [(ROUND(.1 / .2,2))] could not be calculated, Unknown operator '.' at position 8 Expression: [(.1 + .2)] could not be calculated, Unknown operator '.' at position 2 Expression: [CONCAT("Some random: ", ((RANDOM() + .1 - .2 + NOW())))] could not be calculated, Unknown operator '.' at position 38
1 3 0.33 4 Some random: 1642894767951.817
1 2 0.5 3 Some random: 1642894767953.682
1 2 0.5 3 Some random: 1642894767954.340
34 56 0.61 90 Some random: 1642894767978.033
3 4 0.75 7 Some random: 1642894767999.426
1 1 1 2 Some random: 1642894768001.572
4 5 0.8 9 Some random: 1642894768098.007
56,56 54 56 Expression: [(56,56 + 54)] could not be calculated, Too many numbers or variables Some random: 56.86158671454946
1.1 4 0.28 5.1 Some random: 1642894768098.723
5 4 1.25 9 Some random: 1642894768103.480
15 30 0.5 45 Some random: 1642894768088.428
60 15 4 75 Some random: 1642894768149.718
1 2 0.5 3 Some random: 1642894768104.455
100 200 0.5 300 Some random: 1642894768005.811
2 33 0.06 35 Some random: 1642894768075.031
1 1 1 2 Some random: 1642894768106.123
100.10 100.10 1 200.2 Some random: 1642894768107.967
5 6 0.83 11 Some random: 1642894768107.169
15 45 0.33 60 Some random: 1642894768078.815
3 4 0.75 7 Some random: 1642894768108.853
2 3 0.67 5 Some random: 1642894768109.125
1 2 0.5 3 Some random: 1642894768114.043
3 7 0.43 10 Some random: 1642894768112.200
2 3 0.67 5 Some random: 1642894768116.816
100 200 0.5 300 Some random: 1642894768017.717
1 5 0.2 6 Some random: 1642894768114.165
4 5 0.8 9 Some random: 1642894767971.996
4 5 0.8 9 Some random: 1642894767972.799
123 234 0.53 357 Some random: 1642894767947.461
12 12 1 24 Some random: 1642894768059.478
3 4 0.75 7 Some random: 1642894768058.110
3 2 1.5 5 Some random: 1642894768061.406
11111 22222 0.5 33333 Some random: 1642894756950.162
1 2 0.5 3 Some random: 1642894768060.153
1 1 1 2 Some random: 1642894768062.201
10 10 1 20 Some random: 1642894768063.703
1 3 0.33 4 Some random: 1642894768061.817
0.2 0.2 1 0.4 Some random: 1642894768064.199
1 2 0.5 3 Some random: 1642894768064.493
1 4 0.25 5 Some random: 1642894768062.274
12 12 1 24 Some random: 1642894768066.292
10 10 1 20 Some random: 1642894768067.616
23 45 0.51 68 Some random: 1642894768045.536
1 2 0.5 3 Some random: 1642894768067.055
3 7 0.43 10 Some random: 1642894768065.047
5345345 534534 10 5879879 Some random: 1642899578880.552
43.54534 6545.456456 0.01 6589.001796 Some random: 1642894761568.649
1 1 1 2 Some random: 1642894768071.460
144 144 1 288 Some random: 1642894768071.267
114 114 1 228 Some random: 1642894768072.965
114 114 1 228 Some random: 1642894768073.292
114 114 1 228 Some random: 1642894767952.186
114 114 1 228 Some random: 1642894767955.859
114 114 1 228 Some random: 1642894767956.074
5 5 1 10 Some random: 1642894767957.115
4 4 1 8 Some random: 1642894767958.027
2 1 2 3 Some random: 1642894767959.232
1 2 0.5 3 Some random: 1642894767958.903
1 2 0.5 3 Some random: 1642894767959.448
1 2 0.5 3 Some random: 1642894767960.989
2 3 0.67 5 Some random: 1642894767960.614
1097 1079 1.02 2176 Some random: 1642894767981.067
58 2 29 60 Some random: 1642894768019.308
100 100 1 200 Some random: 1642894767964.843
1 1 1 2 Some random: 1642894767965.458
1 2 0.5 3 Some random: 1642894767964.013
56 87 0.64 143 Some random: 1642894767937.733
1 2 0.5 3 Some random: 1642894767973.451
1 1 1 2 Some random: 1642894767975.479
1 2 0.5 3 Some random: 1642894767975.143
2 3 0.67 5 Some random: 1642894767975.373
5 9 0.56 14 Some random: 1642894767973.020
3 3 1 6 Some random: 1642894767978.896
4 4 1 8 Some random: 1642894767979.918
1 2 0.5 3 Some random: 1642894767979.999
2 3 0.67 5 Some random: 1642894767979.458
3 4 0.75 7 Some random: 1642894767968.133
5000 5000 1 10000 Some random: 1642894767970.344
3 3 1 6 Some random: 1642894767970.254
12 13 0.92 25 Some random: 1642894767970.042
.5 .7 Expression: [(ROUND(.5 / .7,2))] could not be calculated, Unknown operator '.' at position 8 Expression: [(.5 + .7)] could not be calculated, Unknown operator '.' at position 2 Expression: [CONCAT("Some random: ", ((RANDOM() + .5 - .7 + NOW())))] could not be calculated, Unknown operator '.' at position 38
0.5 0.7 0.71 1.2 Some random: 1642894768074.418
1 1 1 2 Some random: 1642894768075.440
4 5 0.8 9 Some random: 1642894768074.506
69 420 0.16 489 Some random: 1642894767725.584
1 2 0.5 3 Some random: 1642894768076.842
2 4 0.5 6 Some random: 1642894768075.107
2 3 0.67 5 Some random: 1642894768077.295
3 4 0.75 7 Some random: 1642894768078.506
50 10 5 60 Some random: 1642894768119.158
0 0 0 0 Some random: 1642894768080.313
1 2 0.5 3 Some random: 1642894768081.834
3 7 0.43 10 Some random: 1642894768078.399
1 1 1 2 Some random: 1642894768083.921
11 2 5.5 13 Some random: 1642894768093.426
2 1 2 3 Some random: 1642894768085.384
33 22 1.5 55 Some random: 1642894768096.020
3 3 1 6 Some random: 1642894768086.788
5 5 1 10 Some random: 1642894768087.348
2 2 1 4 Some random: 1642894768087.737
4 5 0.8 9 Some random: 1642894768087.298
4 5 0.8 9 Some random: 1642894767973.131
8+9 12+2 10.75 31 Some random: 1642894768057.660
10.2352 15.2350 0.67 25.4702 Some random: 1642894768045.269
1 2 0.5 3 Some random: 1642894768088.529
10 15 0.67 25 Some random: 1642894768085.851
10 30 0.33 40 Some random: 1642894768070.486
8 9 0.89 17 Some random: 1642894768090.435
3 4 0.75 7 Some random: 1642894768091.512
5 6 0.83 11 Some random: 1642894768091.692
2 3 0.67 5 Some random: 1642894768092.561
4 4 1 8 Some random: 1642894768094.032
0.2 0.5 0.4 0.7 Some random: 1642894768094.672
1 2 0.5 3 Some random: 1642894768094.423
100000 100000 1 200000 Some random: 1642894768096.017
1 1 1 2 Some random: 1642894768097.681
6 7 0.86 13 Some random: 1642894768096.533
10 2 5 12 Some random: 1642894768106.317
1 2 0.5 3 Some random: 1642894768098.797
1 2 0.5 3 Some random: 1642894768109.980
21 7 3 28 Some random: 1642894768125.207
1 2 0.5 3 Some random: 1642894768111.953
1 2 0.5 3 Some random: 1642894768111.290
999 998 1 1997 Some random: 1642894768114.483
17 3 5.67 20 Some random: 1642894768128.221
5 6 0.83 11 Some random: 1642894768113.546
5 4 1.25 9 Some random: 1642894767982.386
1 1 1 2 Some random: 1642894767982.169
25000 0,30 0 Expression: [(25000 + 0,30)] could not be calculated, Too many numbers or variables Some random: 25000.59595115141
5 8 0.62 13 Some random: 1642894767980.331
124 333 0.37 457 Some random: 1642894767775.795
5 1 5 6 Some random: 1642894767989.836
4 1223 0 1227 Some random: 1642894766767.214
2 3 0.67 5 Some random: 1642894767985.786
45 1908 0.02 1953 Some random: 1642894766124.139
3 3 1 6 Some random: 1642894767988.658
1 2 0.5 3 Some random: 1642894767987.906
5 5 1 10 Some random: 1642894767989.554
1 2 0.5 3 Some random: 1642894767989.165
1 2 0.5 3 Some random: 1642894767989.618
1.6 5 0.32 6.6 Some random: 1642894767988.872
4 5 0.8 9 Some random: 1642894767991.945
1 2 0.5 3 Some random: 1642894767992.655
2 3 0.67 5 Some random: 1642894767993.514
1 2 0.5 3 Some random: 1642894767993.022
1 0 0 1 Some random: 1642894767996.258
2 3 0.67 5 Some random: 1642894767995.850
10 1 10 11 Some random: 1642894768005.616
1 1 1 2 Some random: 1642894767997.590
1 4 0.25 5 Some random: 1642894767995.711
1 1 1 2 Some random: 1642894767999.728
7 2 3.5 9 Some random: 1642894767980.847
1 1 1 2 Some random: 1642894768040.007
351 357 0.98 708 Some random: 1642894768034.161
7,567,953,414 1000000 7 Expression: [(7,567,953,414 + 1000000)] could not be calculated, Too many numbers or variables Some random: 7.500030076872423
25 23 1.09 48 Some random: 1642894768044.296
5 9 0.56 14 Some random: 1642894768039.615
13213 123123213 0 123136426 Some random: 1642771658043.327
8 9 0.89 17 Some random: 1642894768043.716
4 3 1.33 7 Some random: 1642894768046.111
123 123 1 246 Some random: 1642894768045.109
10 5 2 15 Some random: 1642894768051.547
2 2 1 4 Some random: 1642894768047.386
4 4 1 8 Some random: 1642894768047.692
4 4 1 8 Some random: 1642894768048.947
12 12 1 24 Some random: 1642894768049.136
1 2 0.5 3 Some random: 1642894768050.792
2 3 0.67 5 Some random: 1642894768051.745
1 2 0.5 3 Some random: 1642894768051.816
1,5 1,2 1 Expression: [(1,5 + 1,2)] could not be calculated, Too many numbers or variables Some random: 1.750559902467446
5 5 1 10 Some random: 1642894768054.065
1 2 0.5 3 Some random: 1642894768053.305
2 2 1 4 Some random: 1642894768055.608
2 3 0.67 5 Some random: 1642894768055.218
10 5 2 15 Some random: 1642894768061.754
1 2 0.5 3 Some random: 1642894768056.256
1 2 0.5 3 Some random: 1642894767970.212



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