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: 1743506231614.319
1 2 0.5 3 Some random: 1743506231622.331
1 1 1 2 Some random: 1743506231627.617
1 2 0.5 3 Some random: 1743506231631.684
4 4 1 8 Some random: 1743506231634.110
4 4 1 8 Some random: 1743506231636.434
7 8 0.88 15 Some random: 1743506231638.689
1 2 0.5 3 Some random: 1743506231639.244
8 9 0.89 17 Some random: 1743506231640.417
4 5 0.8 9 Some random: 1743506231642.475
100 1 100 101 Some random: 1743506231742.106
100 1 100 101 Some random: 1743506231743.656
2 3 0.67 5 Some random: 1743506231646.473
1 1 1 2 Some random: 1743506231649.679
1 2 0.5 3 Some random: 1743506231649.151
10 10 1 20 Some random: 1743506231651.290
1 2 0.5 3 Some random: 1743506231652.161
1 1 1 2 Some random: 1743506231654.783
100 50 2 150 Some random: 1743506231706.318
1 2 0.5 3 Some random: 1743506231661.922
11 13 0.85 24 Some random: 1743506231665.956
23 44 0.52 67 Some random: 1743506231647.315
1 2 0.5 3 Some random: 1743506231669.509
1 3 0.33 4 Some random: 1743506231671.144
5 5 1 10 Some random: 1743506231676.249
20 20 1 40 Some random: 1743506231679.449
1 1 1 2 Some random: 1743506231681.320
1 2 0.5 3 Some random: 1743506231683.163
1 3 0.33 4 Some random: 1743506231686.246
1 2 0.5 3 Some random: 1743506231696.868
5 5 1 10 Some random: 1743506231717.142
10 2 5 12 Some random: 1743506231732.442
2 2 1 4 Some random: 1743506231727.733
5 4 1.25 9 Some random: 1743506231733.503
3 2 1.5 5 Some random: 1743506231742.141
1 2 0.5 3 Some random: 1743506231742.990
2 2 1 4 Some random: 1743506231748.872
5 5 1 10 Some random: 1743506231753.517
3 3 1 6 Some random: 1743506231754.804
22 100 0.22 122 Some random: 1743506232241.973
3 3 1 6 Some random: 1743506232327.839
1 2 0.5 3 Some random: 1743506232334.396
1 1 1 2 Some random: 1743506232351.709
1 0 0 1 Some random: 1743506232361.707
1 2 0.5 3 Some random: 1743506232365.572
1 1 1 2 Some random: 1743506232386.539
33 33 1 66 Some random: 1743506232391.331
545 556 0.98 1101 Some random: 1743506232387.041
545 556 0.98 1101 Some random: 1743506232394.107
3 6 0.5 9 Some random: 1743506232407.344
1 2 0.5 3 Some random: 1743506232417.210
20 10 2 30 Some random: 1743506232433.576
12 12 1 24 Some random: 1743506232429.971
7 5 1.4 12 Some random: 1743506232436.355
11 14 0.79 25 Some random: 1743506232439.574
1 2 0.5 3 Some random: 1743506232448.195
2 2 1 4 Some random: 1743506232456.920
1 2 0.5 3 Some random: 1743506232461.679
24 1 24 25 Some random: 1743506232493.540
13 13 1 26 Some random: 1743506232481.865
100 10 10 110 Some random: 1743506232583.807
2 2 1 4 Some random: 1743506232503.568
5 0 0 5 Some random: 1743506232538.355
0 1 0 1 Some random: 1743506232547.755
5 5 1 10 Some random: 1743506232553.794
2 2 1 4 Some random: 1743506232562.717
-2 2 -1 0 Some random: 1743506232597.767
8 9 0.89 17 Some random: 1743506232629.282
15 1 15 16 Some random: 1743506232661.175
1 1 1 2 Some random: 1743506232669.601
1 1 1 2 Some random: 1743506232670.464
1 1 1 2 Some random: 1743506232671.839
1 2 0.5 3 Some random: 1743506232671.015
45 5 9 50 Some random: 1743506232713.895
2 2 1 4 Some random: 1743506232675.746
2 2 1 4 Some random: 1743506232676.577
5 10 0.5 15 Some random: 1743506232672.520
3 2 1.5 5 Some random: 1743506232679.833
11 13 0.85 24 Some random: 1743506232676.998
22 22 1 44 Some random: 1743506232679.823
2 2 1 4 Some random: 1743506232680.466
1 2 0.5 3 Some random: 1743506232679.182
5 5 1 10 Some random: 1743506232681.310
6 125 0.05 131 Some random: 1743506232563.407
23 32312 0 32335 Some random: 1743506200394.332
1 1 1 2 Some random: 1743506232688.347
1 2 0.5 3 Some random: 1743506232688.572
2 2 1 4 Some random: 1743506232689.430
100 200 0.5 300 Some random: 1743506232590.755
2 2 1 4 Some random: 1743506232690.018
3 5 0.6 8 Some random: 1743506232689.696
3 4 0.75 7 Some random: 1743506232691.763
1 2 0.5 3 Some random: 1743506232691.786
1 2 0.5 3 Some random: 1743506232692.682
5 8 0.62 13 Some random: 1743506232691.181
3 8 0.38 11 Some random: 1743506232689.888
1 1 1 2 Some random: 1743506232695.984
5 3 1.67 8 Some random: 1743506232701.276
10 5 2 15 Some random: 1743506232707.106
1 2 0.5 3 Some random: 1743506232706.524
2 2 1 4 Some random: 1743506232711.789
2 123 0.02 125 Some random: 1743506232592.206
480 60 8 540 Some random: 1743506233135.761
300 20 15 320 Some random: 1743506232996.842
123 321 0.38 444 Some random: 1743506232520.753
6 509 0.01 515 Some random: 1743506232216.021
10 5 2 15 Some random: 1743506232726.582
([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: 1743506232626.976
3 4 0.75 7 Some random: 1743506232726.156
1 2 0.5 3 Some random: 1743506232727.999
3 3 1 6 Some random: 1743506232731.719
2 5 0.4 7 Some random: 1743506232731.982
25.00 25.00 1 50 Some random: 1743506232741.254
555 666 0.83 1221 Some random: 1743506232635.049
2 4 0.5 6 Some random: 1743506232745.585
2 3 0.67 5 Some random: 1743506232747.331
2 4 0.5 6 Some random: 1743506232747.897
1 1 1 2 Some random: 1743506232749.366
7,8 3,6 7 Expression: [(7,8 + 3,6)] could not be calculated, Too many numbers or variables Some random: 7.97943588379660851743506232756
55 40 1.38 95 Some random: 1743506232766.547
2 8 0.25 10 Some random: 1743506232746.553
3 4 0.75 7 Some random: 1743506232752.469
1 2 0.5 3 Some random: 1743506232752.946
3 4 0.75 7 Some random: 1743506232753.590
1 2 0.5 3 Some random: 1743506232755.824
20 10 2 30 Some random: 1743506232769.368
3 4 0.75 7 Some random: 1743506232762.326
4 5 0.8 9 Some random: 1743506232763.178
5 4 1.25 9 Some random: 1743506232766.394
1 1 1 2 Some random: 1743506232766.837
1 2 0.5 3 Some random: 1743506232765.113
5 5 1 10 Some random: 1743506232767.297
3 2 1.5 5 Some random: 1743506232770.963
1 0.30 3.33 1.3 Some random: 1743506232772.689
1 2 0.5 3 Some random: 1743506232773.078
1 3 0.33 4 Some random: 1743506232778.785
1 2 0.5 3 Some random: 1743506232790.145
5 20 0.25 25 Some random: 1743506232784.583
3 3 1 6 Some random: 1743506232800.824
4 2 2 6 Some random: 1743506232803.016
1 2 0.5 3 Some random: 1743506232801.485
2 3 0.67 5 Some random: 1743506232802.832
2 3 0.67 5 Some random: 1743506232802.377
3 4 0.75 7 Some random: 1743506232803.394
1 2 0.5 3 Some random: 1743506232805.715
7 3 2.33 10 Some random: 1743506232812.748
34 12 2.83 46 Some random: 1743506232833.648
2 3 0.67 5 Some random: 1743506232811.584
1 1 1 2 Some random: 1743506232814.137
12,56 2,44 12 Expression: [(12,56 + 2,44)] could not be calculated, Too many numbers or variables Some random: 12.45728813801746541743506232860
1 2 0.5 3 Some random: 1743506232818.637
10 5 2 15 Some random: 1743506232827.139
2 2 1 4 Some random: 1743506232823.543
4 5 0.8 9 Some random: 1743506232823.276
1 2 0.5 3 Some random: 1743506232824.030
3 5 0.6 8 Some random: 1743506232824.465
1 2 0.5 3 Some random: 1743506232826.384
12 10 1.2 22 Some random: 1743506232829.755
1 1 1 2 Some random: 1743506232828.921
1 2 0.5 3 Some random: 1743506232828.867
123 123 1 246 Some random: 1743506232830.022
2 2 1 4 Some random: 1743506232830.371
2 2 1 4 Some random: 1743506232831.767



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