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: 1756901847685.245
1 2 0.5 3 Some random: 1756901847684.010
1 1 1 2 Some random: 1756901847686.451
1 2 0.5 3 Some random: 1756901847685.946
4 4 1 8 Some random: 1756901847687.354
4 4 1 8 Some random: 1756901847687.214
7 8 0.88 15 Some random: 1756901847687.101
1 2 0.5 3 Some random: 1756901847687.036
8 9 0.89 17 Some random: 1756901847688.895
4 5 0.8 9 Some random: 1756901847688.971
100 1 100 101 Some random: 1756901847789.060
100 1 100 101 Some random: 1756901847789.141
2 3 0.67 5 Some random: 1756901847690.485
1 1 1 2 Some random: 1756901847691.789
1 2 0.5 3 Some random: 1756901847690.997
10 10 1 20 Some random: 1756901847692.361
1 2 0.5 3 Some random: 1756901847691.723
1 1 1 2 Some random: 1756901847693.598
100 50 2 150 Some random: 1756901847743.857
1 2 0.5 3 Some random: 1756901847693.847
11 13 0.85 24 Some random: 1756901847692.878
23 44 0.52 67 Some random: 1756901847673.616
1 2 0.5 3 Some random: 1756901847694.713
1 3 0.33 4 Some random: 1756901847693.613
5 5 1 10 Some random: 1756901847696.773
20 20 1 40 Some random: 1756901847697.795
1 1 1 2 Some random: 1756901847697.840
1 2 0.5 3 Some random: 1756901847696.941
1 3 0.33 4 Some random: 1756901847696.264
1 2 0.5 3 Some random: 1756901847697.600
5 5 1 10 Some random: 1756901847699.736
10 2 5 12 Some random: 1756901847707.947
2 2 1 4 Some random: 1756901847700.377
5 4 1.25 9 Some random: 1756901847701.620
3 2 1.5 5 Some random: 1756901847701.120
1 2 0.5 3 Some random: 1756901847700.538
2 2 1 4 Some random: 1756901847701.432
5 5 1 10 Some random: 1756901847701.298
3 3 1 6 Some random: 1756901847702.449
22 100 0.22 122 Some random: 1756901847624.020
3 3 1 6 Some random: 1756901847703.406
1 2 0.5 3 Some random: 1756901847702.647
1 1 1 2 Some random: 1756901847704.097
1 0 0 1 Some random: 1756901847705.094
1 2 0.5 3 Some random: 1756901847703.394
1 1 1 2 Some random: 1756901847705.386
33 33 1 66 Some random: 1756901847705.179
545 556 0.98 1101 Some random: 1756901847694.833
545 556 0.98 1101 Some random: 1756901847695.268
3 6 0.5 9 Some random: 1756901847703.355
1 2 0.5 3 Some random: 1756901847706.892
20 10 2 30 Some random: 1756901847717.499
12 12 1 24 Some random: 1756901847708.534
7 5 1.4 12 Some random: 1756901847710.428
11 14 0.79 25 Some random: 1756901847705.426
1 2 0.5 3 Some random: 1756901847708.746
2 2 1 4 Some random: 1756901847709.954
1 2 0.5 3 Some random: 1756901847708.391
24 1 24 25 Some random: 1756901847733.685
13 13 1 26 Some random: 1756901847710.836
100 10 10 110 Some random: 1756901847800.708
2 2 1 4 Some random: 1756901847711.418
5 0 0 5 Some random: 1756901847716.538
0 1 0 1 Some random: 1756901847711.965
5 5 1 10 Some random: 1756901847712.744
2 2 1 4 Some random: 1756901847712.836
-2 2 -1 0 Some random: 1756901847709.858
8 9 0.89 17 Some random: 1756901847712.737
15 1 15 16 Some random: 1756901847728.508
1 1 1 2 Some random: 1756901847714.855
1 1 1 2 Some random: 1756901847714.353
1 1 1 2 Some random: 1756901847715.059
1 2 0.5 3 Some random: 1756901847714.391
45 5 9 50 Some random: 1756901847755.822
2 2 1 4 Some random: 1756901847716.079
2 2 1 4 Some random: 1756901847716.510
5 10 0.5 15 Some random: 1756901847711.133
3 2 1.5 5 Some random: 1756901847718.314
11 13 0.85 24 Some random: 1756901847715.572
22 22 1 44 Some random: 1756901847718.297
2 2 1 4 Some random: 1756901847718.854
1 2 0.5 3 Some random: 1756901847717.129
5 5 1 10 Some random: 1756901847719.724
6 125 0.05 131 Some random: 1756901847600.456
23 32312 0 32335 Some random: 1756901815430.583
1 1 1 2 Some random: 1756901847720.775
1 2 0.5 3 Some random: 1756901847719.899
2 2 1 4 Some random: 1756901847720.875
100 200 0.5 300 Some random: 1756901847621.945
2 2 1 4 Some random: 1756901847721.611
3 5 0.6 8 Some random: 1756901847720.292
3 4 0.75 7 Some random: 1756901847721.063
1 2 0.5 3 Some random: 1756901847721.134
1 2 0.5 3 Some random: 1756901847722.179
5 8 0.62 13 Some random: 1756901847720.196
3 8 0.38 11 Some random: 1756901847718.303
1 1 1 2 Some random: 1756901847724.433
5 3 1.67 8 Some random: 1756901847726.574
10 5 2 15 Some random: 1756901847730.687
1 2 0.5 3 Some random: 1756901847724.995
2 2 1 4 Some random: 1756901847725.293
2 123 0.02 125 Some random: 1756901847605.967
480 60 8 540 Some random: 1756901848146.186
300 20 15 320 Some random: 1756901848006.538
123 321 0.38 444 Some random: 1756901847529.463
6 509 0.01 515 Some random: 1756901847224.463
10 5 2 15 Some random: 1756901847733.533
([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: 1756901847629.054
3 4 0.75 7 Some random: 1756901847728.699
1 2 0.5 3 Some random: 1756901847728.574
3 3 1 6 Some random: 1756901847730.470
2 5 0.4 7 Some random: 1756901847727.635
25.00 25.00 1 50 Some random: 1756901847731.370
555 666 0.83 1221 Some random: 1756901847620.477
2 4 0.5 6 Some random: 1756901847729.901
2 3 0.67 5 Some random: 1756901847731.540
2 4 0.5 6 Some random: 1756901847730.672
1 1 1 2 Some random: 1756901847732.124
7,8 3,6 7 Expression: [(7,8 + 3,6)] could not be calculated, Too many numbers or variables Some random: 7.88268660966270051756901847739
55 40 1.38 95 Some random: 1756901847748.983
2 8 0.25 10 Some random: 1756901847728.200
3 4 0.75 7 Some random: 1756901847733.972
1 2 0.5 3 Some random: 1756901847733.100
3 4 0.75 7 Some random: 1756901847734.687
1 2 0.5 3 Some random: 1756901847734.371
20 10 2 30 Some random: 1756901847746.821
3 4 0.75 7 Some random: 1756901847735.441
4 5 0.8 9 Some random: 1756901847735.423
5 4 1.25 9 Some random: 1756901847738.550
1 1 1 2 Some random: 1756901847737.762
1 2 0.5 3 Some random: 1756901847737.426
5 5 1 10 Some random: 1756901847738.099
3 2 1.5 5 Some random: 1756901847739.758
1 0.30 3.33 1.3 Some random: 1756901847740.455
1 2 0.5 3 Some random: 1756901847738.424
1 3 0.33 4 Some random: 1756901847737.797
1 2 0.5 3 Some random: 1756901847739.533
5 20 0.25 25 Some random: 1756901847725.693
3 3 1 6 Some random: 1756901847741.011
4 2 2 6 Some random: 1756901847743.360
1 2 0.5 3 Some random: 1756901847740.842
2 3 0.67 5 Some random: 1756901847741.138
2 3 0.67 5 Some random: 1756901847741.347
3 4 0.75 7 Some random: 1756901847742.726
1 2 0.5 3 Some random: 1756901847742.966
7 3 2.33 10 Some random: 1756901847747.082
34 12 2.83 46 Some random: 1756901847766.169
2 3 0.67 5 Some random: 1756901847743.251
1 1 1 2 Some random: 1756901847744.892
12,56 2,44 12 Expression: [(12,56 + 2,44)] could not be calculated, Too many numbers or variables Some random: 12.17699318900710541756901847789
1 2 0.5 3 Some random: 1756901847744.835
10 5 2 15 Some random: 1756901847750.678
2 2 1 4 Some random: 1756901847746.106
4 5 0.8 9 Some random: 1756901847745.914
1 2 0.5 3 Some random: 1756901847745.879
3 5 0.6 8 Some random: 1756901847745.237
1 2 0.5 3 Some random: 1756901847746.591
12 10 1.2 22 Some random: 1756901847749.105
1 1 1 2 Some random: 1756901847748.694
1 2 0.5 3 Some random: 1756901847747.616
123 123 1 246 Some random: 1756901847748.515
2 2 1 4 Some random: 1756901847749.880
2 2 1 4 Some random: 1756901847749.309
1 1 1 2 Some random: 1756901847749.165
1 2 0.5 3 Some random: 1756901847749.322
5 3 1.67 8 Some random: 1756901847752.082
1 2 0.5 3 Some random: 1756901847750.671
10 5 2 15 Some random: 1756901847756.782
1 2 0.5 3 Some random: 1756901847750.896
88 8 11 96 Some random: 1756901847832.640
1 2 0.5 3 Some random: 1756901847751.515
1 2 0.5 3 Some random: 1756901847752.337
1 2 0.5 3 Some random: 1756901847752.069
10 2 5 12 Some random: 1756901847761.966
1 2 0.5 3 Some random: 1756901847753.687
`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: 1756901847753.417
4 2 2 6 Some random: 1756901847757.965
4 3 1.33 7 Some random: 1756901847756.918
5 2 2.5 7 Some random: 1756901847758.715



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