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: 1737520633625.479
1 2 0.5 3 Some random: 1737520633627.257
1 1 1 2 Some random: 1737520633633.020
1 2 0.5 3 Some random: 1737520633634.744
4 4 1 8 Some random: 1737520633637.461
4 4 1 8 Some random: 1737520633644.169
7 8 0.88 15 Some random: 1737520633644.460
1 2 0.5 3 Some random: 1737520633647.550
8 9 0.89 17 Some random: 1737520633648.977
4 5 0.8 9 Some random: 1737520633651.449
100 1 100 101 Some random: 1737520633757.781
100 1 100 101 Some random: 1737520633759.243
2 3 0.67 5 Some random: 1737520633660.180
1 1 1 2 Some random: 1737520633664.084
1 2 0.5 3 Some random: 1737520633666.327
10 10 1 20 Some random: 1737520633671.801
1 2 0.5 3 Some random: 1737520633672.513
1 1 1 2 Some random: 1737520633676.226
100 50 2 150 Some random: 1737520633728.307
1 2 0.5 3 Some random: 1737520633679.834
11 13 0.85 24 Some random: 1737520633679.005
23 44 0.52 67 Some random: 1737520633662.706
1 2 0.5 3 Some random: 1737520633682.298
1 3 0.33 4 Some random: 1737520633683.711
5 5 1 10 Some random: 1737520633688.334
20 20 1 40 Some random: 1737520633690.390
1 1 1 2 Some random: 1737520633692.926
1 2 0.5 3 Some random: 1737520633694.440
1 3 0.33 4 Some random: 1737520633697.890
1 2 0.5 3 Some random: 1737520633700.418
5 5 1 10 Some random: 1737520633702.537
10 2 5 12 Some random: 1737520633713.485
2 2 1 4 Some random: 1737520633708.862
5 4 1.25 9 Some random: 1737520633711.628
3 2 1.5 5 Some random: 1737520633714.955
1 2 0.5 3 Some random: 1737520633715.098
2 2 1 4 Some random: 1737520633717.476
5 5 1 10 Some random: 1737520633722.301
3 3 1 6 Some random: 1737520633728.506
22 100 0.22 122 Some random: 1737520633651.198
3 3 1 6 Some random: 1737520633730.834
1 2 0.5 3 Some random: 1737520633730.671
1 1 1 2 Some random: 1737520633731.393
1 0 0 1 Some random: 1737520633733.321
1 2 0.5 3 Some random: 1737520633732.491
1 1 1 2 Some random: 1737520633737.536
33 33 1 66 Some random: 1737520633740.141
545 556 0.98 1101 Some random: 1737520633731.656
545 556 0.98 1101 Some random: 1737520633733.782
3 6 0.5 9 Some random: 1737520633742.681
1 2 0.5 3 Some random: 1737520633746.277
20 10 2 30 Some random: 1737520633759.726
12 12 1 24 Some random: 1737520633751.156
7 5 1.4 12 Some random: 1737520633756.788
11 14 0.79 25 Some random: 1737520633754.635
1 2 0.5 3 Some random: 1737520633758.845
2 2 1 4 Some random: 1737520633771.243
1 2 0.5 3 Some random: 1737520633779.929
24 1 24 25 Some random: 1737520633809.667
13 13 1 26 Some random: 1737520633793.097
100 10 10 110 Some random: 1737520633890.128
2 2 1 4 Some random: 1737520633804.768
5 0 0 5 Some random: 1737520633812.935
0 1 0 1 Some random: 1737520633811.191
5 5 1 10 Some random: 1737520633817.393
2 2 1 4 Some random: 1737520633826.096
-2 2 -1 0 Some random: 1737520633826.502
8 9 0.89 17 Some random: 1737520633831.233
15 1 15 16 Some random: 1737520633848.782
1 1 1 2 Some random: 1737520633836.404
1 1 1 2 Some random: 1737520633837.315
1 1 1 2 Some random: 1737520633838.150
1 2 0.5 3 Some random: 1737520633838.976
45 5 9 50 Some random: 1737520633881.748
2 2 1 4 Some random: 1737520633843.774
2 2 1 4 Some random: 1737520633845.214
5 10 0.5 15 Some random: 1737520633843.846
3 2 1.5 5 Some random: 1737520633850.329
11 13 0.85 24 Some random: 1737520633860.595
22 22 1 44 Some random: 1737520633865.886
2 2 1 4 Some random: 1737520633867.722
1 2 0.5 3 Some random: 1737520633871.810
5 5 1 10 Some random: 1737520633876.768
6 125 0.05 131 Some random: 1737520633759.987
23 32312 0 32335 Some random: 1737520601590.691
1 1 1 2 Some random: 1737520633882.609
1 2 0.5 3 Some random: 1737520633884.881
2 2 1 4 Some random: 1737520633890.027
100 200 0.5 300 Some random: 1737520633794.641
2 2 1 4 Some random: 1737520633910.103
3 5 0.6 8 Some random: 1737520633917.318
3 4 0.75 7 Some random: 1737520633925.363
1 2 0.5 3 Some random: 1737520633932.806
1 2 0.5 3 Some random: 1737520633967.915
5 8 0.62 13 Some random: 1737520633979.901
3 8 0.38 11 Some random: 1737520633988.761
1 1 1 2 Some random: 1737520633996.869
5 3 1.67 8 Some random: 1737520633999.259
10 5 2 15 Some random: 1737520634007.317
1 2 0.5 3 Some random: 1737520634006.835
2 2 1 4 Some random: 1737520634016.232
2 123 0.02 125 Some random: 1737520633901.576
480 60 8 540 Some random: 1737520634454.308
300 20 15 320 Some random: 1737520634323.784
123 321 0.38 444 Some random: 1737520633851.961
6 509 0.01 515 Some random: 1737520633554.585
10 5 2 15 Some random: 1737520634064.950
([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: 1737520633980.840
3 4 0.75 7 Some random: 1737520634095.012
1 2 0.5 3 Some random: 1737520634096.202
3 3 1 6 Some random: 1737520634101.520
2 5 0.4 7 Some random: 1737520634104.832
25.00 25.00 1 50 Some random: 1737520634112.809
555 666 0.83 1221 Some random: 1737520634004.687
2 4 0.5 6 Some random: 1737520634121.369
2 3 0.67 5 Some random: 1737520634126.322
2 4 0.5 6 Some random: 1737520634129.920
1 1 1 2 Some random: 1737520634138.830
7,8 3,6 7 Expression: [(7,8 + 3,6)] could not be calculated, Too many numbers or variables Some random: 7.97224339366466851737520634152
55 40 1.38 95 Some random: 1737520634171.826
2 8 0.25 10 Some random: 1737520634160.574
3 4 0.75 7 Some random: 1737520634172.920
1 2 0.5 3 Some random: 1737520634178.785
3 4 0.75 7 Some random: 1737520634182.760
1 2 0.5 3 Some random: 1737520634183.024
20 10 2 30 Some random: 1737520634202.760
3 4 0.75 7 Some random: 1737520634198.860
4 5 0.8 9 Some random: 1737520634208.862
5 4 1.25 9 Some random: 1737520634218.317
1 1 1 2 Some random: 1737520634227.989
1 2 0.5 3 Some random: 1737520634233.202
5 5 1 10 Some random: 1737520634238.011
3 2 1.5 5 Some random: 1737520634243.850
1 0.30 3.33 1.3 Some random: 1737520634247.256
1 2 0.5 3 Some random: 1737520634247.725
1 3 0.33 4 Some random: 1737520634249.572
1 2 0.5 3 Some random: 1737520634254.213
5 20 0.25 25 Some random: 1737520634244.258
3 3 1 6 Some random: 1737520634260.258
4 2 2 6 Some random: 1737520634263.610
1 2 0.5 3 Some random: 1737520634261.194
2 3 0.67 5 Some random: 1737520634262.872
2 3 0.67 5 Some random: 1737520634264.490
3 4 0.75 7 Some random: 1737520634270.582
1 2 0.5 3 Some random: 1737520634271.527
7 3 2.33 10 Some random: 1737520634281.586
34 12 2.83 46 Some random: 1737520634300.910
2 3 0.67 5 Some random: 1737520634278.404
1 1 1 2 Some random: 1737520634280.866
12,56 2,44 12 Expression: [(12,56 + 2,44)] could not be calculated, Too many numbers or variables Some random: 12.06470893966755541737520634325
1 2 0.5 3 Some random: 1737520634283.779
10 5 2 15 Some random: 1737520634290.104



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