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: 1772312440838.337
1 2 0.5 3 Some random: 1772312440838.997
1 1 1 2 Some random: 1772312440839.447
1 2 0.5 3 Some random: 1772312440839.033
4 4 1 8 Some random: 1772312440840.184
4 4 1 8 Some random: 1772312440841.909
7 8 0.88 15 Some random: 1772312440841.861
1 2 0.5 3 Some random: 1772312440842.795
8 9 0.89 17 Some random: 1772312440842.866
4 5 0.8 9 Some random: 1772312440843.920
100 1 100 101 Some random: 1772312440943.609
100 1 100 101 Some random: 1772312440944.342
2 3 0.67 5 Some random: 1772312440844.481
1 1 1 2 Some random: 1772312440846.998
1 2 0.5 3 Some random: 1772312440845.260
10 10 1 20 Some random: 1772312440847.754
1 2 0.5 3 Some random: 1772312440846.770
1 1 1 2 Some random: 1772312440848.352
100 50 2 150 Some random: 1772312440898.253
1 2 0.5 3 Some random: 1772312440848.780
11 13 0.85 24 Some random: 1772312440847.575
23 44 0.52 67 Some random: 1772312440829.250
1 2 0.5 3 Some random: 1772312440849.706
1 3 0.33 4 Some random: 1772312440849.706
5 5 1 10 Some random: 1772312440852.188
20 20 1 40 Some random: 1772312440857.937
1 1 1 2 Some random: 1772312440858.151
1 2 0.5 3 Some random: 1772312440858.180
1 3 0.33 4 Some random: 1772312440857.703
1 2 0.5 3 Some random: 1772312440859.787
5 5 1 10 Some random: 1772312440860.886
10 2 5 12 Some random: 1772312440869.602
2 2 1 4 Some random: 1772312440861.179
5 4 1.25 9 Some random: 1772312440862.072
3 2 1.5 5 Some random: 1772312440863.502
1 2 0.5 3 Some random: 1772312440861.691
2 2 1 4 Some random: 1772312440863.669
5 5 1 10 Some random: 1772312440863.797
3 3 1 6 Some random: 1772312440864.020
22 100 0.22 122 Some random: 1772312440786.171
3 3 1 6 Some random: 1772312440865.949
1 2 0.5 3 Some random: 1772312440864.817
1 1 1 2 Some random: 1772312440865.000
1 0 0 1 Some random: 1772312440867.058
1 2 0.5 3 Some random: 1772312440865.079
1 1 1 2 Some random: 1772312440867.095
33 33 1 66 Some random: 1772312440867.918
545 556 0.98 1101 Some random: 1772312440857.929
545 556 0.98 1101 Some random: 1772312440861.769
3 6 0.5 9 Some random: 1772312440870.280
1 2 0.5 3 Some random: 1772312440873.083
20 10 2 30 Some random: 1772312440884.657
12 12 1 24 Some random: 1772312440876.897
7 5 1.4 12 Some random: 1772312440878.008
11 14 0.79 25 Some random: 1772312440873.393
1 2 0.5 3 Some random: 1772312440876.559
2 2 1 4 Some random: 1772312440877.408
1 2 0.5 3 Some random: 1772312440877.196
24 1 24 25 Some random: 1772312440901.250
13 13 1 26 Some random: 1772312440878.567
100 10 10 110 Some random: 1772312440969.274
2 2 1 4 Some random: 1772312440879.392
5 0 0 5 Some random: 1772312440884.022
0 1 0 1 Some random: 1772312440879.062
5 5 1 10 Some random: 1772312440880.146
2 2 1 4 Some random: 1772312440881.670
-2 2 -1 0 Some random: 1772312440877.581
8 9 0.89 17 Some random: 1772312440881.221
15 1 15 16 Some random: 1772312440896.822
1 1 1 2 Some random: 1772312440882.909
1 1 1 2 Some random: 1772312440883.511
1 1 1 2 Some random: 1772312440883.349
1 2 0.5 3 Some random: 1772312440882.681
45 5 9 50 Some random: 1772312440925.313
2 2 1 4 Some random: 1772312440886.828
2 2 1 4 Some random: 1772312440886.410
5 10 0.5 15 Some random: 1772312440882.793
3 2 1.5 5 Some random: 1772312440888.889
11 13 0.85 24 Some random: 1772312440886.171
22 22 1 44 Some random: 1772312440888.171
2 2 1 4 Some random: 1772312440888.495
1 2 0.5 3 Some random: 1772312440888.237
5 5 1 10 Some random: 1772312440889.711
6 125 0.05 131 Some random: 1772312440771.685
23 32312 0 32335 Some random: 1772312408601.842
1 1 1 2 Some random: 1772312440890.390
1 2 0.5 3 Some random: 1772312440890.254
2 2 1 4 Some random: 1772312440891.565
100 200 0.5 300 Some random: 1772312440792.500
2 2 1 4 Some random: 1772312440892.643
3 5 0.6 8 Some random: 1772312440890.298
3 4 0.75 7 Some random: 1772312440892.441
1 2 0.5 3 Some random: 1772312440892.319
1 2 0.5 3 Some random: 1772312440893.297
5 8 0.62 13 Some random: 1772312440891.160
3 8 0.38 11 Some random: 1772312440890.205
1 1 1 2 Some random: 1772312440895.032
5 3 1.67 8 Some random: 1772312440897.953
10 5 2 15 Some random: 1772312440901.596
1 2 0.5 3 Some random: 1772312440895.210
2 2 1 4 Some random: 1772312440897.291
2 123 0.02 125 Some random: 1772312440776.561
480 60 8 540 Some random: 1772312441317.761
300 20 15 320 Some random: 1772312441178.337
123 321 0.38 444 Some random: 1772312440700.497
6 509 0.01 515 Some random: 1772312440396.735
10 5 2 15 Some random: 1772312440904.740
([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: 1772312440800.963
3 4 0.75 7 Some random: 1772312440899.712
1 2 0.5 3 Some random: 1772312440900.916
3 3 1 6 Some random: 1772312440901.353
2 5 0.4 7 Some random: 1772312440899.200
25.00 25.00 1 50 Some random: 1772312440902.252
555 666 0.83 1221 Some random: 1772312440791.875
2 4 0.5 6 Some random: 1772312440901.392
2 3 0.67 5 Some random: 1772312440902.433
2 4 0.5 6 Some random: 1772312440902.461
1 1 1 2 Some random: 1772312440904.686
7,8 3,6 7 Expression: [(7,8 + 3,6)] could not be calculated, Too many numbers or variables Some random: 7.97956769262249551772312440910
55 40 1.38 95 Some random: 1772312440920.087
2 8 0.25 10 Some random: 1772312440903.528
3 4 0.75 7 Some random: 1772312440908.727
1 2 0.5 3 Some random: 1772312440909.248
3 4 0.75 7 Some random: 1772312440909.777
1 2 0.5 3 Some random: 1772312440910.169
20 10 2 30 Some random: 1772312440921.523
3 4 0.75 7 Some random: 1772312440911.147
4 5 0.8 9 Some random: 1772312440911.473
5 4 1.25 9 Some random: 1772312440913.456
1 1 1 2 Some random: 1772312440913.206
1 2 0.5 3 Some random: 1772312440912.765
5 5 1 10 Some random: 1772312440914.076
3 2 1.5 5 Some random: 1772312440915.031
1 0.30 3.33 1.3 Some random: 1772312440915.869
1 2 0.5 3 Some random: 1772312440914.171
1 3 0.33 4 Some random: 1772312440913.849
1 2 0.5 3 Some random: 1772312440915.531
5 20 0.25 25 Some random: 1772312440901.062
3 3 1 6 Some random: 1772312440916.505
4 2 2 6 Some random: 1772312440919.486
1 2 0.5 3 Some random: 1772312440916.048
2 3 0.67 5 Some random: 1772312440917.596
2 3 0.67 5 Some random: 1772312440917.661
3 4 0.75 7 Some random: 1772312440917.192
1 2 0.5 3 Some random: 1772312440918.061
7 3 2.33 10 Some random: 1772312440923.786
34 12 2.83 46 Some random: 1772312440941.707
2 3 0.67 5 Some random: 1772312440919.064
1 1 1 2 Some random: 1772312440920.397
12,56 2,44 12 Expression: [(12,56 + 2,44)] could not be calculated, Too many numbers or variables Some random: 12.12057907868564541772312440964
1 2 0.5 3 Some random: 1772312440921.904
10 5 2 15 Some random: 1772312440927.216
2 2 1 4 Some random: 1772312440923.423
4 5 0.8 9 Some random: 1772312440922.892
1 2 0.5 3 Some random: 1772312440922.976
3 5 0.6 8 Some random: 1772312440922.551
1 2 0.5 3 Some random: 1772312440923.845
12 10 1.2 22 Some random: 1772312440926.338
1 1 1 2 Some random: 1772312440925.143
1 2 0.5 3 Some random: 1772312440924.824
123 123 1 246 Some random: 1772312440926.205
2 2 1 4 Some random: 1772312440926.533
2 2 1 4 Some random: 1772312440926.216
1 1 1 2 Some random: 1772312440927.652
1 2 0.5 3 Some random: 1772312440926.430
5 3 1.67 8 Some random: 1772312440930.979
1 2 0.5 3 Some random: 1772312440927.009
10 5 2 15 Some random: 1772312440933.416
1 2 0.5 3 Some random: 1772312440928.525
88 8 11 96 Some random: 1772312441009.677
1 2 0.5 3 Some random: 1772312440928.184
1 2 0.5 3 Some random: 1772312440929.603
1 2 0.5 3 Some random: 1772312440929.833
10 2 5 12 Some random: 1772312440939.027
1 2 0.5 3 Some random: 1772312440930.608
`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: 1772312440931.965
4 2 2 6 Some random: 1772312440935.125
4 3 1.33 7 Some random: 1772312440935.322
5 2 2.5 7 Some random: 1772312440937.300
3 4 0.75 7 Some random: 1772312440933.045
1 1 1 2 Some random: 1772312440935.129
134 426 0.31 560 Some random: 1772312440643.706
12 12 1 24 Some random: 1772312440936.016
2 3 0.67 5 Some random: 1772312440935.018
10 20 0.5 30 Some random: 1772312440926.026
1 2 0.5 3 Some random: 1772312440936.465



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