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: 1761300001149.578
1 2 0.5 3 Some random: 1761300001148.724
1 1 1 2 Some random: 1761300001150.145
1 2 0.5 3 Some random: 1761300001149.893
4 4 1 8 Some random: 1761300001150.088
4 4 1 8 Some random: 1761300001151.468
7 8 0.88 15 Some random: 1761300001150.380
1 2 0.5 3 Some random: 1761300001150.548
8 9 0.89 17 Some random: 1761300001151.763
4 5 0.8 9 Some random: 1761300001151.744
100 1 100 101 Some random: 1761300001251.145
100 1 100 101 Some random: 1761300001252.414
2 3 0.67 5 Some random: 1761300001152.401
1 1 1 2 Some random: 1761300001153.589
1 2 0.5 3 Some random: 1761300001153.703
10 10 1 20 Some random: 1761300001154.625
1 2 0.5 3 Some random: 1761300001153.344
1 1 1 2 Some random: 1761300001155.115
100 50 2 150 Some random: 1761300001205.278
1 2 0.5 3 Some random: 1761300001154.429
11 13 0.85 24 Some random: 1761300001153.617
23 44 0.52 67 Some random: 1761300001135.350
1 2 0.5 3 Some random: 1761300001155.658
1 3 0.33 4 Some random: 1761300001154.076
5 5 1 10 Some random: 1761300001157.114
20 20 1 40 Some random: 1761300001157.566
1 1 1 2 Some random: 1761300001157.983
1 2 0.5 3 Some random: 1761300001157.035
1 3 0.33 4 Some random: 1761300001156.660
1 2 0.5 3 Some random: 1761300001157.839
5 5 1 10 Some random: 1761300001159.666
10 2 5 12 Some random: 1761300001167.069
2 2 1 4 Some random: 1761300001159.624
5 4 1.25 9 Some random: 1761300001161.566
3 2 1.5 5 Some random: 1761300001161.624
1 2 0.5 3 Some random: 1761300001160.697
2 2 1 4 Some random: 1761300001161.648
5 5 1 10 Some random: 1761300001161.007
3 3 1 6 Some random: 1761300001162.766
22 100 0.22 122 Some random: 1761300001084.436
3 3 1 6 Some random: 1761300001162.975
1 2 0.5 3 Some random: 1761300001162.480
1 1 1 2 Some random: 1761300001163.016
1 0 0 1 Some random: 1761300001164.760
1 2 0.5 3 Some random: 1761300001163.798
1 1 1 2 Some random: 1761300001164.674
33 33 1 66 Some random: 1761300001164.947
545 556 0.98 1101 Some random: 1761300001153.120
545 556 0.98 1101 Some random: 1761300001154.035
3 6 0.5 9 Some random: 1761300001162.738
1 2 0.5 3 Some random: 1761300001164.518
20 10 2 30 Some random: 1761300001176.518
12 12 1 24 Some random: 1761300001166.937
7 5 1.4 12 Some random: 1761300001168.169
11 14 0.79 25 Some random: 1761300001164.245
1 2 0.5 3 Some random: 1761300001166.066
2 2 1 4 Some random: 1761300001167.986
1 2 0.5 3 Some random: 1761300001167.283
24 1 24 25 Some random: 1761300001191.642
13 13 1 26 Some random: 1761300001168.677
100 10 10 110 Some random: 1761300001258.608
2 2 1 4 Some random: 1761300001169.982
5 0 0 5 Some random: 1761300001174.658
0 1 0 1 Some random: 1761300001169.541
5 5 1 10 Some random: 1761300001170.312
2 2 1 4 Some random: 1761300001170.849
-2 2 -1 0 Some random: 1761300001167.369
8 9 0.89 17 Some random: 1761300001170.321
15 1 15 16 Some random: 1761300001185.037
1 1 1 2 Some random: 1761300001171.108
1 1 1 2 Some random: 1761300001172.218
1 1 1 2 Some random: 1761300001172.074
1 2 0.5 3 Some random: 1761300001171.610
45 5 9 50 Some random: 1761300001213.847
2 2 1 4 Some random: 1761300001173.604
2 2 1 4 Some random: 1761300001173.717
5 10 0.5 15 Some random: 1761300001169.453
3 2 1.5 5 Some random: 1761300001175.987
11 13 0.85 24 Some random: 1761300001172.767
22 22 1 44 Some random: 1761300001175.531
2 2 1 4 Some random: 1761300001175.867
1 2 0.5 3 Some random: 1761300001174.896
5 5 1 10 Some random: 1761300001175.482
6 125 0.05 131 Some random: 1761300001057.564
23 32312 0 32335 Some random: 1761299968887.526
1 1 1 2 Some random: 1761300001176.196
1 2 0.5 3 Some random: 1761300001176.264
2 2 1 4 Some random: 1761300001177.003
100 200 0.5 300 Some random: 1761300001077.053
2 2 1 4 Some random: 1761300001178.284
3 5 0.6 8 Some random: 1761300001176.444
3 4 0.75 7 Some random: 1761300001177.539
1 2 0.5 3 Some random: 1761300001177.915
1 2 0.5 3 Some random: 1761300001178.311
5 8 0.62 13 Some random: 1761300001176.686
3 8 0.38 11 Some random: 1761300001174.522
1 1 1 2 Some random: 1761300001180.194
5 3 1.67 8 Some random: 1761300001182.890
10 5 2 15 Some random: 1761300001185.288
1 2 0.5 3 Some random: 1761300001180.217
2 2 1 4 Some random: 1761300001181.197
2 123 0.02 125 Some random: 1761300001060.591
480 60 8 540 Some random: 1761300001602.836
300 20 15 320 Some random: 1761300001462.789
123 321 0.38 444 Some random: 1761300000984.275
6 509 0.01 515 Some random: 1761300000680.364
10 5 2 15 Some random: 1761300001188.635
([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: 1761300001084.741
3 4 0.75 7 Some random: 1761300001183.659
1 2 0.5 3 Some random: 1761300001183.404
3 3 1 6 Some random: 1761300001185.636
2 5 0.4 7 Some random: 1761300001182.419
25.00 25.00 1 50 Some random: 1761300001185.618
555 666 0.83 1221 Some random: 1761300001074.586
2 4 0.5 6 Some random: 1761300001184.490
2 3 0.67 5 Some random: 1761300001185.816
2 4 0.5 6 Some random: 1761300001184.727
1 1 1 2 Some random: 1761300001187.548
7,8 3,6 7 Expression: [(7,8 + 3,6)] could not be calculated, Too many numbers or variables Some random: 7.70418499414180251761300001193
55 40 1.38 95 Some random: 1761300001202.404
2 8 0.25 10 Some random: 1761300001181.607
3 4 0.75 7 Some random: 1761300001187.694
1 2 0.5 3 Some random: 1761300001187.863
3 4 0.75 7 Some random: 1761300001187.882
1 2 0.5 3 Some random: 1761300001188.024
20 10 2 30 Some random: 1761300001199.870
3 4 0.75 7 Some random: 1761300001188.300
4 5 0.8 9 Some random: 1761300001189.777
5 4 1.25 9 Some random: 1761300001191.894
1 1 1 2 Some random: 1761300001190.227
1 2 0.5 3 Some random: 1761300001190.612
5 5 1 10 Some random: 1761300001191.579
3 2 1.5 5 Some random: 1761300001192.314
1 0.30 3.33 1.3 Some random: 1761300001193.566
1 2 0.5 3 Some random: 1761300001191.940
1 3 0.33 4 Some random: 1761300001190.696
1 2 0.5 3 Some random: 1761300001191.459
5 20 0.25 25 Some random: 1761300001178.144
3 3 1 6 Some random: 1761300001193.975
4 2 2 6 Some random: 1761300001195.818
1 2 0.5 3 Some random: 1761300001193.838
2 3 0.67 5 Some random: 1761300001193.151
2 3 0.67 5 Some random: 1761300001193.262
3 4 0.75 7 Some random: 1761300001194.425
1 2 0.5 3 Some random: 1761300001194.158
7 3 2.33 10 Some random: 1761300001199.784
34 12 2.83 46 Some random: 1761300001217.466
2 3 0.67 5 Some random: 1761300001195.094
1 1 1 2 Some random: 1761300001196.791
12,56 2,44 12 Expression: [(12,56 + 2,44)] could not be calculated, Too many numbers or variables Some random: 12.96068286396892541761300001240
1 2 0.5 3 Some random: 1761300001196.939
10 5 2 15 Some random: 1761300001202.922
2 2 1 4 Some random: 1761300001197.631
4 5 0.8 9 Some random: 1761300001197.027
1 2 0.5 3 Some random: 1761300001197.083
3 5 0.6 8 Some random: 1761300001196.860
1 2 0.5 3 Some random: 1761300001197.951
12 10 1.2 22 Some random: 1761300001201.111
1 1 1 2 Some random: 1761300001199.732
1 2 0.5 3 Some random: 1761300001198.028
123 123 1 246 Some random: 1761300001200.715
2 2 1 4 Some random: 1761300001200.205
2 2 1 4 Some random: 1761300001200.021
1 1 1 2 Some random: 1761300001201.070
1 2 0.5 3 Some random: 1761300001200.707
5 3 1.67 8 Some random: 1761300001203.059
1 2 0.5 3 Some random: 1761300001200.970
10 5 2 15 Some random: 1761300001207.461
1 2 0.5 3 Some random: 1761300001201.715
88 8 11 96 Some random: 1761300001282.542
1 2 0.5 3 Some random: 1761300001202.326
1 2 0.5 3 Some random: 1761300001202.246
1 2 0.5 3 Some random: 1761300001202.994
10 2 5 12 Some random: 1761300001212.983
1 2 0.5 3 Some random: 1761300001203.052
`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: 1761300001203.091
4 2 2 6 Some random: 1761300001207.187
4 3 1.33 7 Some random: 1761300001206.164
5 2 2.5 7 Some random: 1761300001208.188
3 4 0.75 7 Some random: 1761300001205.651
1 1 1 2 Some random: 1761300001206.888
134 426 0.31 560 Some random: 1761300000914.037
12 12 1 24 Some random: 1761300001207.764
2 3 0.67 5 Some random: 1761300001206.233



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