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: 1767185521329.756
1 2 0.5 3 Some random: 1767185521329.247
1 1 1 2 Some random: 1767185521330.466
1 2 0.5 3 Some random: 1767185521330.082
4 4 1 8 Some random: 1767185521331.964
4 4 1 8 Some random: 1767185521332.794
7 8 0.88 15 Some random: 1767185521331.173
1 2 0.5 3 Some random: 1767185521332.741
8 9 0.89 17 Some random: 1767185521332.856
4 5 0.8 9 Some random: 1767185521333.904
100 1 100 101 Some random: 1767185521433.758
100 1 100 101 Some random: 1767185521434.473
2 3 0.67 5 Some random: 1767185521334.904
1 1 1 2 Some random: 1767185521335.637
1 2 0.5 3 Some random: 1767185521335.025
10 10 1 20 Some random: 1767185521336.645
1 2 0.5 3 Some random: 1767185521336.274
1 1 1 2 Some random: 1767185521337.438
100 50 2 150 Some random: 1767185521387.524
1 2 0.5 3 Some random: 1767185521337.483
11 13 0.85 24 Some random: 1767185521336.164
23 44 0.52 67 Some random: 1767185521317.922
1 2 0.5 3 Some random: 1767185521338.356
1 3 0.33 4 Some random: 1767185521337.391
5 5 1 10 Some random: 1767185521340.781
20 20 1 40 Some random: 1767185521340.404
1 1 1 2 Some random: 1767185521340.657
1 2 0.5 3 Some random: 1767185521340.445
1 3 0.33 4 Some random: 1767185521339.946
1 2 0.5 3 Some random: 1767185521340.862
5 5 1 10 Some random: 1767185521342.521
10 2 5 12 Some random: 1767185521350.646
2 2 1 4 Some random: 1767185521342.539
5 4 1.25 9 Some random: 1767185521344.558
3 2 1.5 5 Some random: 1767185521344.274
1 2 0.5 3 Some random: 1767185521343.122
2 2 1 4 Some random: 1767185521344.308
5 5 1 10 Some random: 1767185521344.452
3 3 1 6 Some random: 1767185521345.835
22 100 0.22 122 Some random: 1767185521267.974
3 3 1 6 Some random: 1767185521345.143
1 2 0.5 3 Some random: 1767185521345.884
1 1 1 2 Some random: 1767185521346.347
1 0 0 1 Some random: 1767185521347.881
1 2 0.5 3 Some random: 1767185521346.512
1 1 1 2 Some random: 1767185521347.753
33 33 1 66 Some random: 1767185521348.401
545 556 0.98 1101 Some random: 1767185521337.880
545 556 0.98 1101 Some random: 1767185521337.656
3 6 0.5 9 Some random: 1767185521346.531
1 2 0.5 3 Some random: 1767185521348.942
20 10 2 30 Some random: 1767185521360.965
12 12 1 24 Some random: 1767185521350.042
7 5 1.4 12 Some random: 1767185521352.041
11 14 0.79 25 Some random: 1767185521348.379
1 2 0.5 3 Some random: 1767185521350.302
2 2 1 4 Some random: 1767185521351.799
1 2 0.5 3 Some random: 1767185521351.862
24 1 24 25 Some random: 1767185521375.531
13 13 1 26 Some random: 1767185521353.846
100 10 10 110 Some random: 1767185521443.061
2 2 1 4 Some random: 1767185521353.598
5 0 0 5 Some random: 1767185521359.761
0 1 0 1 Some random: 1767185521353.147
5 5 1 10 Some random: 1767185521355.682
2 2 1 4 Some random: 1767185521355.014
-2 2 -1 0 Some random: 1767185521352.072
8 9 0.89 17 Some random: 1767185521355.915
15 1 15 16 Some random: 1767185521371.325
1 1 1 2 Some random: 1767185521357.221
1 1 1 2 Some random: 1767185521357.998
1 1 1 2 Some random: 1767185521358.742
1 2 0.5 3 Some random: 1767185521357.722
45 5 9 50 Some random: 1767185521398.670
2 2 1 4 Some random: 1767185521359.822
2 2 1 4 Some random: 1767185521359.971
5 10 0.5 15 Some random: 1767185521355.830
3 2 1.5 5 Some random: 1767185521361.726
11 13 0.85 24 Some random: 1767185521358.053
22 22 1 44 Some random: 1767185521361.312
2 2 1 4 Some random: 1767185521361.642
1 2 0.5 3 Some random: 1767185521360.943
5 5 1 10 Some random: 1767185521362.091
6 125 0.05 131 Some random: 1767185521243.277
23 32312 0 32335 Some random: 1767185489074.702
1 1 1 2 Some random: 1767185521363.019
1 2 0.5 3 Some random: 1767185521362.719
2 2 1 4 Some random: 1767185521364.849
100 200 0.5 300 Some random: 1767185521264.699
2 2 1 4 Some random: 1767185521365.572
3 5 0.6 8 Some random: 1767185521363.388
3 4 0.75 7 Some random: 1767185521365.147
1 2 0.5 3 Some random: 1767185521365.108
1 2 0.5 3 Some random: 1767185521366.518
5 8 0.62 13 Some random: 1767185521364.268
3 8 0.38 11 Some random: 1767185521363.979
1 1 1 2 Some random: 1767185521368.527
5 3 1.67 8 Some random: 1767185521371.840
10 5 2 15 Some random: 1767185521374.672
1 2 0.5 3 Some random: 1767185521369.314
2 2 1 4 Some random: 1767185521370.199
2 123 0.02 125 Some random: 1767185521250.982
480 60 8 540 Some random: 1767185521791.793
300 20 15 320 Some random: 1767185521652.702
123 321 0.38 444 Some random: 1767185521174.258
6 509 0.01 515 Some random: 1767185520870.894
10 5 2 15 Some random: 1767185521378.658
([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: 1767185521274.563
3 4 0.75 7 Some random: 1767185521374.367
1 2 0.5 3 Some random: 1767185521374.058
3 3 1 6 Some random: 1767185521376.788
2 5 0.4 7 Some random: 1767185521373.110
25.00 25.00 1 50 Some random: 1767185521376.785
555 666 0.83 1221 Some random: 1767185521266.396
2 4 0.5 6 Some random: 1767185521375.396
2 3 0.67 5 Some random: 1767185521376.375
2 4 0.5 6 Some random: 1767185521376.321
1 1 1 2 Some random: 1767185521378.081
7,8 3,6 7 Expression: [(7,8 + 3,6)] could not be calculated, Too many numbers or variables Some random: 7.82670504598657651767185521385
55 40 1.38 95 Some random: 1767185521394.446
2 8 0.25 10 Some random: 1767185521373.347
3 4 0.75 7 Some random: 1767185521379.677
1 2 0.5 3 Some random: 1767185521379.569
3 4 0.75 7 Some random: 1767185521379.559
1 2 0.5 3 Some random: 1767185521380.761
20 10 2 30 Some random: 1767185521391.934
3 4 0.75 7 Some random: 1767185521381.414
4 5 0.8 9 Some random: 1767185521381.121
5 4 1.25 9 Some random: 1767185521383.799
1 1 1 2 Some random: 1767185521383.818
1 2 0.5 3 Some random: 1767185521382.221
5 5 1 10 Some random: 1767185521384.115
3 2 1.5 5 Some random: 1767185521385.668
1 0.30 3.33 1.3 Some random: 1767185521384.727
1 2 0.5 3 Some random: 1767185521384.332
1 3 0.33 4 Some random: 1767185521383.549
1 2 0.5 3 Some random: 1767185521385.239
5 20 0.25 25 Some random: 1767185521371.347
3 3 1 6 Some random: 1767185521387.875
4 2 2 6 Some random: 1767185521389.824
1 2 0.5 3 Some random: 1767185521387.480
2 3 0.67 5 Some random: 1767185521387.678
2 3 0.67 5 Some random: 1767185521387.078
3 4 0.75 7 Some random: 1767185521388.918
1 2 0.5 3 Some random: 1767185521388.856
7 3 2.33 10 Some random: 1767185521393.450
34 12 2.83 46 Some random: 1767185521412.245
2 3 0.67 5 Some random: 1767185521389.288
1 1 1 2 Some random: 1767185521391.667
12,56 2,44 12 Expression: [(12,56 + 2,44)] could not be calculated, Too many numbers or variables Some random: 12.46706743383569541767185521435
1 2 0.5 3 Some random: 1767185521390.215
10 5 2 15 Some random: 1767185521397.254
2 2 1 4 Some random: 1767185521392.182
4 5 0.8 9 Some random: 1767185521392.909
1 2 0.5 3 Some random: 1767185521392.996
3 5 0.6 8 Some random: 1767185521392.423
1 2 0.5 3 Some random: 1767185521393.482
12 10 1.2 22 Some random: 1767185521397.350
1 1 1 2 Some random: 1767185521395.722
1 2 0.5 3 Some random: 1767185521395.398
123 123 1 246 Some random: 1767185521396.098
2 2 1 4 Some random: 1767185521397.159
2 2 1 4 Some random: 1767185521397.271
1 1 1 2 Some random: 1767185521398.630
1 2 0.5 3 Some random: 1767185521397.911
5 3 1.67 8 Some random: 1767185521401.585
1 2 0.5 3 Some random: 1767185521398.677
10 5 2 15 Some random: 1767185521405.750
1 2 0.5 3 Some random: 1767185521399.284
88 8 11 96 Some random: 1767185521481.159
1 2 0.5 3 Some random: 1767185521400.923
1 2 0.5 3 Some random: 1767185521401.151
1 2 0.5 3 Some random: 1767185521401.074
10 2 5 12 Some random: 1767185521411.777
1 2 0.5 3 Some random: 1767185521402.852
`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: 1767185521403.906
4 2 2 6 Some random: 1767185521406.967
4 3 1.33 7 Some random: 1767185521406.997
5 2 2.5 7 Some random: 1767185521408.679
3 4 0.75 7 Some random: 1767185521405.319
1 1 1 2 Some random: 1767185521406.618
134 426 0.31 560 Some random: 1767185521115.590
12 12 1 24 Some random: 1767185521407.052
2 3 0.67 5 Some random: 1767185521407.540
10 20 0.5 30 Some random: 1767185521398.141



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