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: 1767184626114.408
1 2 0.5 3 Some random: 1767184626114.685
1 1 1 2 Some random: 1767184626116.058
1 2 0.5 3 Some random: 1767184626116.555
4 4 1 8 Some random: 1767184626118.420
4 4 1 8 Some random: 1767184626119.888
7 8 0.88 15 Some random: 1767184626119.189
1 2 0.5 3 Some random: 1767184626120.475
8 9 0.89 17 Some random: 1767184626120.926
4 5 0.8 9 Some random: 1767184626122.093
100 1 100 101 Some random: 1767184626223.667
100 1 100 101 Some random: 1767184626223.592
2 3 0.67 5 Some random: 1767184626124.580
1 1 1 2 Some random: 1767184626126.378
1 2 0.5 3 Some random: 1767184626126.030
10 10 1 20 Some random: 1767184626128.169
1 2 0.5 3 Some random: 1767184626128.068
1 1 1 2 Some random: 1767184626129.609
100 50 2 150 Some random: 1767184626180.449
1 2 0.5 3 Some random: 1767184626130.043
11 13 0.85 24 Some random: 1767184626130.284
23 44 0.52 67 Some random: 1767184626112.062
1 2 0.5 3 Some random: 1767184626133.392
1 3 0.33 4 Some random: 1767184626132.696
5 5 1 10 Some random: 1767184626135.324
20 20 1 40 Some random: 1767184626136.926
1 1 1 2 Some random: 1767184626137.185
1 2 0.5 3 Some random: 1767184626136.181
1 3 0.33 4 Some random: 1767184626136.408
1 2 0.5 3 Some random: 1767184626138.140
5 5 1 10 Some random: 1767184626140.963
10 2 5 12 Some random: 1767184626149.702
2 2 1 4 Some random: 1767184626141.405
5 4 1.25 9 Some random: 1767184626143.598
3 2 1.5 5 Some random: 1767184626144.316
1 2 0.5 3 Some random: 1767184626143.547
2 2 1 4 Some random: 1767184626145.923
5 5 1 10 Some random: 1767184626145.187
3 3 1 6 Some random: 1767184626147.881
22 100 0.22 122 Some random: 1767184626070.328
3 3 1 6 Some random: 1767184626149.805
1 2 0.5 3 Some random: 1767184626149.442
1 1 1 2 Some random: 1767184626151.240
1 0 0 1 Some random: 1767184626152.161
1 2 0.5 3 Some random: 1767184626151.436
1 1 1 2 Some random: 1767184626153.910
33 33 1 66 Some random: 1767184626154.737
545 556 0.98 1101 Some random: 1767184626144.506
545 556 0.98 1101 Some random: 1767184626144.486
3 6 0.5 9 Some random: 1767184626153.423
1 2 0.5 3 Some random: 1767184626156.254
20 10 2 30 Some random: 1767184626168.882
12 12 1 24 Some random: 1767184626159.580
7 5 1.4 12 Some random: 1767184626162.584
11 14 0.79 25 Some random: 1767184626157.571
1 2 0.5 3 Some random: 1767184626160.534
2 2 1 4 Some random: 1767184626162.918
1 2 0.5 3 Some random: 1767184626162.734
24 1 24 25 Some random: 1767184626187.636
13 13 1 26 Some random: 1767184626165.495
100 10 10 110 Some random: 1767184626256.062
2 2 1 4 Some random: 1767184626166.531
5 0 0 5 Some random: 1767184626172.999
0 1 0 1 Some random: 1767184626167.111
5 5 1 10 Some random: 1767184626169.915
2 2 1 4 Some random: 1767184626170.086
-2 2 -1 0 Some random: 1767184626167.665
8 9 0.89 17 Some random: 1767184626170.301
15 1 15 16 Some random: 1767184626186.467
1 1 1 2 Some random: 1767184626173.271
1 1 1 2 Some random: 1767184626174.867
1 1 1 2 Some random: 1767184626175.254
1 2 0.5 3 Some random: 1767184626174.979
45 5 9 50 Some random: 1767184626216.423
2 2 1 4 Some random: 1767184626177.573
2 2 1 4 Some random: 1767184626177.279
5 10 0.5 15 Some random: 1767184626173.135
3 2 1.5 5 Some random: 1767184626180.179
11 13 0.85 24 Some random: 1767184626177.080
22 22 1 44 Some random: 1767184626180.775
2 2 1 4 Some random: 1767184626181.114
1 2 0.5 3 Some random: 1767184626181.563
5 5 1 10 Some random: 1767184626182.717
6 125 0.05 131 Some random: 1767184626064.106
23 32312 0 32335 Some random: 1767184593895.706
1 1 1 2 Some random: 1767184626184.795
1 2 0.5 3 Some random: 1767184626184.487
2 2 1 4 Some random: 1767184626186.239
100 200 0.5 300 Some random: 1767184626086.310
2 2 1 4 Some random: 1767184626187.500
3 5 0.6 8 Some random: 1767184626186.479
3 4 0.75 7 Some random: 1767184626187.606
1 2 0.5 3 Some random: 1767184626188.160
1 2 0.5 3 Some random: 1767184626188.117
5 8 0.62 13 Some random: 1767184626187.994
3 8 0.38 11 Some random: 1767184626186.589
1 1 1 2 Some random: 1767184626191.153
5 3 1.67 8 Some random: 1767184626194.361
10 5 2 15 Some random: 1767184626198.670
1 2 0.5 3 Some random: 1767184626192.397
2 2 1 4 Some random: 1767184626194.432
2 123 0.02 125 Some random: 1767184626074.521
480 60 8 540 Some random: 1767184626615.264
300 20 15 320 Some random: 1767184626476.852
123 321 0.38 444 Some random: 1767184625998.282
6 509 0.01 515 Some random: 1767184625694.240
10 5 2 15 Some random: 1767184626203.454
([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: 1767184626100.828
3 4 0.75 7 Some random: 1767184626199.936
1 2 0.5 3 Some random: 1767184626200.146
3 3 1 6 Some random: 1767184626202.680
2 5 0.4 7 Some random: 1767184626199.607
25.00 25.00 1 50 Some random: 1767184626203.628
555 666 0.83 1221 Some random: 1767184626093.419
2 4 0.5 6 Some random: 1767184626202.064
2 3 0.67 5 Some random: 1767184626204.465
2 4 0.5 6 Some random: 1767184626204.581
1 1 1 2 Some random: 1767184626206.876
7,8 3,6 7 Expression: [(7,8 + 3,6)] could not be calculated, Too many numbers or variables Some random: 7.44316826071935151767184626213
55 40 1.38 95 Some random: 1767184626223.143
2 8 0.25 10 Some random: 1767184626202.662
3 4 0.75 7 Some random: 1767184626208.701
1 2 0.5 3 Some random: 1767184626209.828
3 4 0.75 7 Some random: 1767184626209.710
1 2 0.5 3 Some random: 1767184626210.111
20 10 2 30 Some random: 1767184626222.268
3 4 0.75 7 Some random: 1767184626211.970
4 5 0.8 9 Some random: 1767184626212.483
5 4 1.25 9 Some random: 1767184626215.097
1 1 1 2 Some random: 1767184626214.837
1 2 0.5 3 Some random: 1767184626214.272
5 5 1 10 Some random: 1767184626216.334
3 2 1.5 5 Some random: 1767184626217.847
1 0.30 3.33 1.3 Some random: 1767184626217.752
1 2 0.5 3 Some random: 1767184626216.963
1 3 0.33 4 Some random: 1767184626216.689
1 2 0.5 3 Some random: 1767184626218.755
5 20 0.25 25 Some random: 1767184626204.311
3 3 1 6 Some random: 1767184626220.330
4 2 2 6 Some random: 1767184626223.982
1 2 0.5 3 Some random: 1767184626220.171
2 3 0.67 5 Some random: 1767184626221.054
2 3 0.67 5 Some random: 1767184626221.813
3 4 0.75 7 Some random: 1767184626222.142
1 2 0.5 3 Some random: 1767184626223.560
7 3 2.33 10 Some random: 1767184626228.935
34 12 2.83 46 Some random: 1767184626247.912
2 3 0.67 5 Some random: 1767184626224.948
1 1 1 2 Some random: 1767184626226.322
12,56 2,44 12 Expression: [(12,56 + 2,44)] could not be calculated, Too many numbers or variables Some random: 12.66555295092104541767184626270
1 2 0.5 3 Some random: 1767184626226.227
10 5 2 15 Some random: 1767184626233.705
2 2 1 4 Some random: 1767184626228.852
4 5 0.8 9 Some random: 1767184626228.030
1 2 0.5 3 Some random: 1767184626229.373
3 5 0.6 8 Some random: 1767184626228.779
1 2 0.5 3 Some random: 1767184626230.350
12 10 1.2 22 Some random: 1767184626234.218
1 1 1 2 Some random: 1767184626232.219
1 2 0.5 3 Some random: 1767184626232.958
123 123 1 246 Some random: 1767184626234.494
2 2 1 4 Some random: 1767184626234.147
2 2 1 4 Some random: 1767184626235.627
1 1 1 2 Some random: 1767184626236.494
1 2 0.5 3 Some random: 1767184626235.302
5 3 1.67 8 Some random: 1767184626239.875
1 2 0.5 3 Some random: 1767184626236.865
10 5 2 15 Some random: 1767184626243.925
1 2 0.5 3 Some random: 1767184626238.470
88 8 11 96 Some random: 1767184626319.595
1 2 0.5 3 Some random: 1767184626239.951
1 2 0.5 3 Some random: 1767184626240.484
1 2 0.5 3 Some random: 1767184626240.967
10 2 5 12 Some random: 1767184626250.905
1 2 0.5 3 Some random: 1767184626242.459
`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: 1767184626243.962
4 2 2 6 Some random: 1767184626247.934
4 3 1.33 7 Some random: 1767184626246.245
5 2 2.5 7 Some random: 1767184626249.725
3 4 0.75 7 Some random: 1767184626245.382
1 1 1 2 Some random: 1767184626247.779
134 426 0.31 560 Some random: 1767184625956.454
12 12 1 24 Some random: 1767184626248.979
2 3 0.67 5 Some random: 1767184626248.753
10 20 0.5 30 Some random: 1767184626239.909



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