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: 1779955793196.292
1 2 0.5 3 Some random: 1779955793195.318
1 1 1 2 Some random: 1779955793197.924
1 2 0.5 3 Some random: 1779955793197.161
4 4 1 8 Some random: 1779955793199.683
4 4 1 8 Some random: 1779955793200.063
7 8 0.88 15 Some random: 1779955793199.821
1 2 0.5 3 Some random: 1779955793200.479
8 9 0.89 17 Some random: 1779955793201.644
4 5 0.8 9 Some random: 1779955793201.129
100 1 100 101 Some random: 1779955793302.222
100 1 100 101 Some random: 1779955793303.976
2 3 0.67 5 Some random: 1779955793203.895
1 1 1 2 Some random: 1779955793205.600
1 2 0.5 3 Some random: 1779955793205.716
10 10 1 20 Some random: 1779955793207.561
1 2 0.5 3 Some random: 1779955793206.269
1 1 1 2 Some random: 1779955793208.625
100 50 2 150 Some random: 1779955793258.693
1 2 0.5 3 Some random: 1779955793208.105
11 13 0.85 24 Some random: 1779955793208.837
23 44 0.52 67 Some random: 1779955793189.621
1 2 0.5 3 Some random: 1779955793210.339
1 3 0.33 4 Some random: 1779955793210.574
5 5 1 10 Some random: 1779955793212.981
20 20 1 40 Some random: 1779955793213.529
1 1 1 2 Some random: 1779955793214.683
1 2 0.5 3 Some random: 1779955793214.894
1 3 0.33 4 Some random: 1779955793213.276
1 2 0.5 3 Some random: 1779955793215.188
5 5 1 10 Some random: 1779955793216.181
10 2 5 12 Some random: 1779955793225.290
2 2 1 4 Some random: 1779955793218.975
5 4 1.25 9 Some random: 1779955793219.297
3 2 1.5 5 Some random: 1779955793220.747
1 2 0.5 3 Some random: 1779955793218.424
2 2 1 4 Some random: 1779955793220.074
5 5 1 10 Some random: 1779955793220.385
3 3 1 6 Some random: 1779955793221.363
22 100 0.22 122 Some random: 1779955793144.205
3 3 1 6 Some random: 1779955793223.445
1 2 0.5 3 Some random: 1779955793222.640
1 1 1 2 Some random: 1779955793224.413
1 0 0 1 Some random: 1779955793225.774
1 2 0.5 3 Some random: 1779955793224.278
1 1 1 2 Some random: 1779955793226.466
33 33 1 66 Some random: 1779955793226.656
545 556 0.98 1101 Some random: 1779955793216.756
545 556 0.98 1101 Some random: 1779955793217.105
3 6 0.5 9 Some random: 1779955793225.157
1 2 0.5 3 Some random: 1779955793228.306
20 10 2 30 Some random: 1779955793240.586
12 12 1 24 Some random: 1779955793232.051
7 5 1.4 12 Some random: 1779955793235.113
11 14 0.79 25 Some random: 1779955793230.076
1 2 0.5 3 Some random: 1779955793233.378
2 2 1 4 Some random: 1779955793235.523
1 2 0.5 3 Some random: 1779955793234.646
24 1 24 25 Some random: 1779955793259.100
13 13 1 26 Some random: 1779955793236.545
100 10 10 110 Some random: 1779955793327.457
2 2 1 4 Some random: 1779955793238.504
5 0 0 5 Some random: 1779955793243.629
0 1 0 1 Some random: 1779955793238.140
5 5 1 10 Some random: 1779955793239.435
2 2 1 4 Some random: 1779955793240.917
-2 2 -1 0 Some random: 1779955793237.024
8 9 0.89 17 Some random: 1779955793240.668
15 1 15 16 Some random: 1779955793256.397
1 1 1 2 Some random: 1779955793242.136
1 1 1 2 Some random: 1779955793243.072
1 1 1 2 Some random: 1779955793243.960
1 2 0.5 3 Some random: 1779955793243.442
45 5 9 50 Some random: 1779955793285.160
2 2 1 4 Some random: 1779955793245.901
2 2 1 4 Some random: 1779955793246.518
5 10 0.5 15 Some random: 1779955793241.229
3 2 1.5 5 Some random: 1779955793248.574
11 13 0.85 24 Some random: 1779955793245.777
22 22 1 44 Some random: 1779955793248.667
2 2 1 4 Some random: 1779955793249.747
1 2 0.5 3 Some random: 1779955793248.202
5 5 1 10 Some random: 1779955793250.925
6 125 0.05 131 Some random: 1779955793131.731
23 32312 0 32335 Some random: 1779955760962.861
1 1 1 2 Some random: 1779955793252.596
1 2 0.5 3 Some random: 1779955793251.050
2 2 1 4 Some random: 1779955793253.404
100 200 0.5 300 Some random: 1779955793153.852
2 2 1 4 Some random: 1779955793254.200
3 5 0.6 8 Some random: 1779955793252.671
3 4 0.75 7 Some random: 1779955793254.487
1 2 0.5 3 Some random: 1779955793254.337
1 2 0.5 3 Some random: 1779955793255.403
5 8 0.62 13 Some random: 1779955793253.500
3 8 0.38 11 Some random: 1779955793252.127
1 1 1 2 Some random: 1779955793257.371
5 3 1.67 8 Some random: 1779955793260.606
10 5 2 15 Some random: 1779955793264.039
1 2 0.5 3 Some random: 1779955793259.788
2 2 1 4 Some random: 1779955793260.227
2 123 0.02 125 Some random: 1779955793140.841
480 60 8 540 Some random: 1779955793681.313
300 20 15 320 Some random: 1779955793542.203
123 321 0.38 444 Some random: 1779955793065.365
6 509 0.01 515 Some random: 1779955792760.451
10 5 2 15 Some random: 1779955793269.124
([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: 1779955793165.695
3 4 0.75 7 Some random: 1779955793265.326
1 2 0.5 3 Some random: 1779955793265.837
3 3 1 6 Some random: 1779955793267.519
2 5 0.4 7 Some random: 1779955793264.373
25.00 25.00 1 50 Some random: 1779955793268.867
555 666 0.83 1221 Some random: 1779955793157.285
2 4 0.5 6 Some random: 1779955793267.221
2 3 0.67 5 Some random: 1779955793268.880
2 4 0.5 6 Some random: 1779955793268.476
1 1 1 2 Some random: 1779955793271.475
7,8 3,6 7 Expression: [(7,8 + 3,6)] could not be calculated, Too many numbers or variables Some random: 7.60199491579046451779955793277
55 40 1.38 95 Some random: 1779955793287.559
2 8 0.25 10 Some random: 1779955793266.496
3 4 0.75 7 Some random: 1779955793272.315
1 2 0.5 3 Some random: 1779955793272.440
3 4 0.75 7 Some random: 1779955793273.139
1 2 0.5 3 Some random: 1779955793273.520
20 10 2 30 Some random: 1779955793285.412
3 4 0.75 7 Some random: 1779955793274.055
4 5 0.8 9 Some random: 1779955793275.297
5 4 1.25 9 Some random: 1779955793278.333
1 1 1 2 Some random: 1779955793277.586
1 2 0.5 3 Some random: 1779955793277.665
5 5 1 10 Some random: 1779955793278.739
3 2 1.5 5 Some random: 1779955793280.698
1 0.30 3.33 1.3 Some random: 1779955793280.277
1 2 0.5 3 Some random: 1779955793279.727
1 3 0.33 4 Some random: 1779955793278.778
1 2 0.5 3 Some random: 1779955793280.461
5 20 0.25 25 Some random: 1779955793266.242
3 3 1 6 Some random: 1779955793282.810
4 2 2 6 Some random: 1779955793284.721
1 2 0.5 3 Some random: 1779955793283.001
2 3 0.67 5 Some random: 1779955793283.336
2 3 0.67 5 Some random: 1779955793284.055
3 4 0.75 7 Some random: 1779955793284.768
1 2 0.5 3 Some random: 1779955793285.833
7 3 2.33 10 Some random: 1779955793290.208
34 12 2.83 46 Some random: 1779955793308.613
2 3 0.67 5 Some random: 1779955793286.555
1 1 1 2 Some random: 1779955793287.271
12,56 2,44 12 Expression: [(12,56 + 2,44)] could not be calculated, Too many numbers or variables Some random: 12.57458210345923541779955793332
1 2 0.5 3 Some random: 1779955793287.529
10 5 2 15 Some random: 1779955793294.892
2 2 1 4 Some random: 1779955793289.372
4 5 0.8 9 Some random: 1779955793289.847
1 2 0.5 3 Some random: 1779955793289.427
3 5 0.6 8 Some random: 1779955793288.752
1 2 0.5 3 Some random: 1779955793290.097
12 10 1.2 22 Some random: 1779955793293.382
1 1 1 2 Some random: 1779955793292.999
1 2 0.5 3 Some random: 1779955793291.054
123 123 1 246 Some random: 1779955793293.470
2 2 1 4 Some random: 1779955793293.403
2 2 1 4 Some random: 1779955793294.746
1 1 1 2 Some random: 1779955793294.338
1 2 0.5 3 Some random: 1779955793294.776
5 3 1.67 8 Some random: 1779955793297.280
1 2 0.5 3 Some random: 1779955793294.650
10 5 2 15 Some random: 1779955793301.992
1 2 0.5 3 Some random: 1779955793295.298
88 8 11 96 Some random: 1779955793377.317
1 2 0.5 3 Some random: 1779955793296.416
1 2 0.5 3 Some random: 1779955793297.299
1 2 0.5 3 Some random: 1779955793297.873
10 2 5 12 Some random: 1779955793307.191
1 2 0.5 3 Some random: 1779955793298.767
`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: 1779955793299.207
4 2 2 6 Some random: 1779955793303.573
4 3 1.33 7 Some random: 1779955793302.707
5 2 2.5 7 Some random: 1779955793305.779
3 4 0.75 7 Some random: 1779955793301.381
1 1 1 2 Some random: 1779955793303.184
134 426 0.31 560 Some random: 1779955793011.584
12 12 1 24 Some random: 1779955793304.622
2 3 0.67 5 Some random: 1779955793303.798
10 20 0.5 30 Some random: 1779955793295.714
1 2 0.5 3 Some random: 1779955793304.598
2 1 2 3 Some random: 1779955793307.203



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