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: 1757031136584.892
1 2 0.5 3 Some random: 1757031136584.202
1 1 1 2 Some random: 1757031136585.025
1 2 0.5 3 Some random: 1757031136585.135
4 4 1 8 Some random: 1757031136586.141
4 4 1 8 Some random: 1757031136587.416
7 8 0.88 15 Some random: 1757031136587.645
1 2 0.5 3 Some random: 1757031136587.747
8 9 0.89 17 Some random: 1757031136588.742
4 5 0.8 9 Some random: 1757031136588.856
100 1 100 101 Some random: 1757031136689.643
100 1 100 101 Some random: 1757031136689.517
2 3 0.67 5 Some random: 1757031136590.813
1 1 1 2 Some random: 1757031136591.987
1 2 0.5 3 Some random: 1757031136591.006
10 10 1 20 Some random: 1757031136593.036
1 2 0.5 3 Some random: 1757031136592.087
1 1 1 2 Some random: 1757031136594.473
100 50 2 150 Some random: 1757031136644.230
1 2 0.5 3 Some random: 1757031136594.715
11 13 0.85 24 Some random: 1757031136594.111
23 44 0.52 67 Some random: 1757031136575.842
1 2 0.5 3 Some random: 1757031136596.519
1 3 0.33 4 Some random: 1757031136595.067
5 5 1 10 Some random: 1757031136598.294
20 20 1 40 Some random: 1757031136598.172
1 1 1 2 Some random: 1757031136599.279
1 2 0.5 3 Some random: 1757031136599.030
1 3 0.33 4 Some random: 1757031136598.733
1 2 0.5 3 Some random: 1757031136600.345
5 5 1 10 Some random: 1757031136601.275
10 2 5 12 Some random: 1757031136610.688
2 2 1 4 Some random: 1757031136602.423
5 4 1.25 9 Some random: 1757031136604.190
3 2 1.5 5 Some random: 1757031136605.246
1 2 0.5 3 Some random: 1757031136603.930
2 2 1 4 Some random: 1757031136605.935
5 5 1 10 Some random: 1757031136605.642
3 3 1 6 Some random: 1757031136606.542
22 100 0.22 122 Some random: 1757031136529.280
3 3 1 6 Some random: 1757031136607.889
1 2 0.5 3 Some random: 1757031136607.926
1 1 1 2 Some random: 1757031136609.329
1 0 0 1 Some random: 1757031136610.426
1 2 0.5 3 Some random: 1757031136609.589
1 1 1 2 Some random: 1757031136610.621
33 33 1 66 Some random: 1757031136611.228
545 556 0.98 1101 Some random: 1757031136600.676
545 556 0.98 1101 Some random: 1757031136601.997
3 6 0.5 9 Some random: 1757031136609.426
1 2 0.5 3 Some random: 1757031136612.838
20 10 2 30 Some random: 1757031136623.944
12 12 1 24 Some random: 1757031136614.813
7 5 1.4 12 Some random: 1757031136617.328
11 14 0.79 25 Some random: 1757031136612.419
1 2 0.5 3 Some random: 1757031136615.663
2 2 1 4 Some random: 1757031136617.821
1 2 0.5 3 Some random: 1757031136616.928
24 1 24 25 Some random: 1757031136641.201
13 13 1 26 Some random: 1757031136618.399
100 10 10 110 Some random: 1757031136709.783
2 2 1 4 Some random: 1757031136619.610
5 0 0 5 Some random: 1757031136625.164
0 1 0 1 Some random: 1757031136620.863
5 5 1 10 Some random: 1757031136621.158
2 2 1 4 Some random: 1757031136622.351
-2 2 -1 0 Some random: 1757031136618.872
8 9 0.89 17 Some random: 1757031136622.404
15 1 15 16 Some random: 1757031136637.568
1 1 1 2 Some random: 1757031136624.984
1 1 1 2 Some random: 1757031136624.904
1 1 1 2 Some random: 1757031136625.074
1 2 0.5 3 Some random: 1757031136624.520
45 5 9 50 Some random: 1757031136666.858
2 2 1 4 Some random: 1757031136627.704
2 2 1 4 Some random: 1757031136629.816
5 10 0.5 15 Some random: 1757031136625.086
3 2 1.5 5 Some random: 1757031136632.983
11 13 0.85 24 Some random: 1757031136629.221
22 22 1 44 Some random: 1757031136632.373
2 2 1 4 Some random: 1757031136632.391
1 2 0.5 3 Some random: 1757031136632.865
5 5 1 10 Some random: 1757031136633.539
6 125 0.05 131 Some random: 1757031136515.049
23 32312 0 32335 Some random: 1757031104346.531
1 1 1 2 Some random: 1757031136635.495
1 2 0.5 3 Some random: 1757031136635.794
2 2 1 4 Some random: 1757031136636.565
100 200 0.5 300 Some random: 1757031136537.223
2 2 1 4 Some random: 1757031136637.134
3 5 0.6 8 Some random: 1757031136636.086
3 4 0.75 7 Some random: 1757031136637.851
1 2 0.5 3 Some random: 1757031136638.867
1 2 0.5 3 Some random: 1757031136638.824
5 8 0.62 13 Some random: 1757031136637.751
3 8 0.38 11 Some random: 1757031136636.776
1 1 1 2 Some random: 1757031136641.892
5 3 1.67 8 Some random: 1757031136644.824
10 5 2 15 Some random: 1757031136647.335
1 2 0.5 3 Some random: 1757031136642.490
2 2 1 4 Some random: 1757031136643.240
2 123 0.02 125 Some random: 1757031136523.510
480 60 8 540 Some random: 1757031137064.800
300 20 15 320 Some random: 1757031136925.275
123 321 0.38 444 Some random: 1757031136447.582
6 509 0.01 515 Some random: 1757031136143.626
10 5 2 15 Some random: 1757031136651.077
([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: 1757031136547.531
3 4 0.75 7 Some random: 1757031136647.395
1 2 0.5 3 Some random: 1757031136647.134
3 3 1 6 Some random: 1757031136649.816
2 5 0.4 7 Some random: 1757031136646.818
25.00 25.00 1 50 Some random: 1757031136650.335
555 666 0.83 1221 Some random: 1757031136540.371
2 4 0.5 6 Some random: 1757031136649.291
2 3 0.67 5 Some random: 1757031136651.652
2 4 0.5 6 Some random: 1757031136650.464
1 1 1 2 Some random: 1757031136653.622
7,8 3,6 7 Expression: [(7,8 + 3,6)] could not be calculated, Too many numbers or variables Some random: 7.79309159304377751757031136659
55 40 1.38 95 Some random: 1757031136669.112
2 8 0.25 10 Some random: 1757031136648.716
3 4 0.75 7 Some random: 1757031136654.724
1 2 0.5 3 Some random: 1757031136654.440
3 4 0.75 7 Some random: 1757031136655.191
1 2 0.5 3 Some random: 1757031136655.702
20 10 2 30 Some random: 1757031136667.811
3 4 0.75 7 Some random: 1757031136656.311
4 5 0.8 9 Some random: 1757031136657.180
5 4 1.25 9 Some random: 1757031136659.336
1 1 1 2 Some random: 1757031136659.861
1 2 0.5 3 Some random: 1757031136659.967
5 5 1 10 Some random: 1757031136660.363
3 2 1.5 5 Some random: 1757031136662.035
1 0.30 3.33 1.3 Some random: 1757031136661.965
1 2 0.5 3 Some random: 1757031136661.939
1 3 0.33 4 Some random: 1757031136660.721
1 2 0.5 3 Some random: 1757031136662.201
5 20 0.25 25 Some random: 1757031136648.246
3 3 1 6 Some random: 1757031136664.519
4 2 2 6 Some random: 1757031136666.338
1 2 0.5 3 Some random: 1757031136664.513
2 3 0.67 5 Some random: 1757031136664.602
2 3 0.67 5 Some random: 1757031136665.227
3 4 0.75 7 Some random: 1757031136665.771
1 2 0.5 3 Some random: 1757031136666.098
7 3 2.33 10 Some random: 1757031136671.885
34 12 2.83 46 Some random: 1757031136690.685
2 3 0.67 5 Some random: 1757031136667.622
1 1 1 2 Some random: 1757031136669.003
12,56 2,44 12 Expression: [(12,56 + 2,44)] could not be calculated, Too many numbers or variables Some random: 12.84509033259485541757031136713
1 2 0.5 3 Some random: 1757031136669.202
10 5 2 15 Some random: 1757031136675.228
2 2 1 4 Some random: 1757031136671.508
4 5 0.8 9 Some random: 1757031136670.700
1 2 0.5 3 Some random: 1757031136671.293
3 5 0.6 8 Some random: 1757031136671.430
1 2 0.5 3 Some random: 1757031136672.745
12 10 1.2 22 Some random: 1757031136676.528
1 1 1 2 Some random: 1757031136675.527
1 2 0.5 3 Some random: 1757031136674.065
123 123 1 246 Some random: 1757031136676.755
2 2 1 4 Some random: 1757031136676.887
2 2 1 4 Some random: 1757031136677.530
1 1 1 2 Some random: 1757031136677.006
1 2 0.5 3 Some random: 1757031136677.597
5 3 1.67 8 Some random: 1757031136680.588
1 2 0.5 3 Some random: 1757031136678.731
10 5 2 15 Some random: 1757031136684.286
1 2 0.5 3 Some random: 1757031136679.374
88 8 11 96 Some random: 1757031136760.391
1 2 0.5 3 Some random: 1757031136680.443
1 2 0.5 3 Some random: 1757031136680.057
1 2 0.5 3 Some random: 1757031136681.071
10 2 5 12 Some random: 1757031136690.278
1 2 0.5 3 Some random: 1757031136682.168
`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: 1757031136683.962
4 2 2 6 Some random: 1757031136686.908
4 3 1.33 7 Some random: 1757031136686.886
5 2 2.5 7 Some random: 1757031136688.595



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