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: 1762080286692.536
1 2 0.5 3 Some random: 1762080286691.346
1 1 1 2 Some random: 1762080286692.092
1 2 0.5 3 Some random: 1762080286692.981
4 4 1 8 Some random: 1762080286693.383
4 4 1 8 Some random: 1762080286693.521
7 8 0.88 15 Some random: 1762080286693.199
1 2 0.5 3 Some random: 1762080286693.107
8 9 0.89 17 Some random: 1762080286693.788
4 5 0.8 9 Some random: 1762080286693.709
100 1 100 101 Some random: 1762080286794.216
100 1 100 101 Some random: 1762080286794.557
2 3 0.67 5 Some random: 1762080286694.222
1 1 1 2 Some random: 1762080286696.161
1 2 0.5 3 Some random: 1762080286695.896
10 10 1 20 Some random: 1762080286696.969
1 2 0.5 3 Some random: 1762080286696.812
1 1 1 2 Some random: 1762080286697.156
100 50 2 150 Some random: 1762080286747.038
1 2 0.5 3 Some random: 1762080286696.272
11 13 0.85 24 Some random: 1762080286696.025
23 44 0.52 67 Some random: 1762080286677.560
1 2 0.5 3 Some random: 1762080286697.223
1 3 0.33 4 Some random: 1762080286697.263
5 5 1 10 Some random: 1762080286699.454
20 20 1 40 Some random: 1762080286699.214
1 1 1 2 Some random: 1762080286700.342
1 2 0.5 3 Some random: 1762080286699.542
1 3 0.33 4 Some random: 1762080286698.335
1 2 0.5 3 Some random: 1762080286699.537
5 5 1 10 Some random: 1762080286701.050
10 2 5 12 Some random: 1762080286709.228
2 2 1 4 Some random: 1762080286701.517
5 4 1.25 9 Some random: 1762080286703.138
3 2 1.5 5 Some random: 1762080286703.660
1 2 0.5 3 Some random: 1762080286701.165
2 2 1 4 Some random: 1762080286702.496
5 5 1 10 Some random: 1762080286703.763
3 3 1 6 Some random: 1762080286703.614
22 100 0.22 122 Some random: 1762080286625.256
3 3 1 6 Some random: 1762080286704.756
1 2 0.5 3 Some random: 1762080286703.337
1 1 1 2 Some random: 1762080286704.593
1 0 0 1 Some random: 1762080286705.902
1 2 0.5 3 Some random: 1762080286704.123
1 1 1 2 Some random: 1762080286705.488
33 33 1 66 Some random: 1762080286705.556
545 556 0.98 1101 Some random: 1762080286694.506
545 556 0.98 1101 Some random: 1762080286695.054
3 6 0.5 9 Some random: 1762080286703.431
1 2 0.5 3 Some random: 1762080286705.436
20 10 2 30 Some random: 1762080286717.422
12 12 1 24 Some random: 1762080286707.760
7 5 1.4 12 Some random: 1762080286709.746
11 14 0.79 25 Some random: 1762080286705.053
1 2 0.5 3 Some random: 1762080286707.753
2 2 1 4 Some random: 1762080286708.882
1 2 0.5 3 Some random: 1762080286707.199
24 1 24 25 Some random: 1762080286732.771
13 13 1 26 Some random: 1762080286709.915
100 10 10 110 Some random: 1762080286799.969
2 2 1 4 Some random: 1762080286710.413
5 0 0 5 Some random: 1762080286715.848
0 1 0 1 Some random: 1762080286709.918
5 5 1 10 Some random: 1762080286710.375
2 2 1 4 Some random: 1762080286711.910
-2 2 -1 0 Some random: 1762080286707.938
8 9 0.89 17 Some random: 1762080286710.957
15 1 15 16 Some random: 1762080286725.304
1 1 1 2 Some random: 1762080286712.756
1 1 1 2 Some random: 1762080286712.201
1 1 1 2 Some random: 1762080286712.960
1 2 0.5 3 Some random: 1762080286712.642
45 5 9 50 Some random: 1762080286753.806
2 2 1 4 Some random: 1762080286713.542
2 2 1 4 Some random: 1762080286714.429
5 10 0.5 15 Some random: 1762080286709.910
3 2 1.5 5 Some random: 1762080286715.346
11 13 0.85 24 Some random: 1762080286712.055
22 22 1 44 Some random: 1762080286715.091
2 2 1 4 Some random: 1762080286715.137
1 2 0.5 3 Some random: 1762080286714.725
5 5 1 10 Some random: 1762080286715.406
6 125 0.05 131 Some random: 1762080286597.561
23 32312 0 32335 Some random: 1762080254427.701
1 1 1 2 Some random: 1762080286716.460
1 2 0.5 3 Some random: 1762080286716.945
2 2 1 4 Some random: 1762080286717.486
100 200 0.5 300 Some random: 1762080286617.213
2 2 1 4 Some random: 1762080286717.133
3 5 0.6 8 Some random: 1762080286716.635
3 4 0.75 7 Some random: 1762080286717.419
1 2 0.5 3 Some random: 1762080286717.360
1 2 0.5 3 Some random: 1762080286717.365
5 8 0.62 13 Some random: 1762080286716.440
3 8 0.38 11 Some random: 1762080286714.936
1 1 1 2 Some random: 1762080286719.175
5 3 1.67 8 Some random: 1762080286721.057
10 5 2 15 Some random: 1762080286725.698
1 2 0.5 3 Some random: 1762080286719.405
2 2 1 4 Some random: 1762080286720.614
2 123 0.02 125 Some random: 1762080286600.091
480 60 8 540 Some random: 1762080287141.149
300 20 15 320 Some random: 1762080287001.139
123 321 0.38 444 Some random: 1762080286524.462
6 509 0.01 515 Some random: 1762080286219.680
10 5 2 15 Some random: 1762080286727.679
([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: 1762080286623.573
3 4 0.75 7 Some random: 1762080286722.523
1 2 0.5 3 Some random: 1762080286722.597
3 3 1 6 Some random: 1762080286723.585
2 5 0.4 7 Some random: 1762080286721.567
25.00 25.00 1 50 Some random: 1762080286724.785
555 666 0.83 1221 Some random: 1762080286613.598
2 4 0.5 6 Some random: 1762080286723.128
2 3 0.67 5 Some random: 1762080286724.842
2 4 0.5 6 Some random: 1762080286723.742
1 1 1 2 Some random: 1762080286725.435
7,8 3,6 7 Expression: [(7,8 + 3,6)] could not be calculated, Too many numbers or variables Some random: 7.40715124745955251762080286732
55 40 1.38 95 Some random: 1762080286741.106
2 8 0.25 10 Some random: 1762080286720.325
3 4 0.75 7 Some random: 1762080286726.000
1 2 0.5 3 Some random: 1762080286726.153
3 4 0.75 7 Some random: 1762080286726.417
1 2 0.5 3 Some random: 1762080286727.994
20 10 2 30 Some random: 1762080286738.315
3 4 0.75 7 Some random: 1762080286727.841
4 5 0.8 9 Some random: 1762080286728.893
5 4 1.25 9 Some random: 1762080286730.338
1 1 1 2 Some random: 1762080286729.259
1 2 0.5 3 Some random: 1762080286728.671
5 5 1 10 Some random: 1762080286730.979
3 2 1.5 5 Some random: 1762080286731.207
1 0.30 3.33 1.3 Some random: 1762080286730.871
1 2 0.5 3 Some random: 1762080286730.304
1 3 0.33 4 Some random: 1762080286729.069
1 2 0.5 3 Some random: 1762080286730.763
5 20 0.25 25 Some random: 1762080286717.708
3 3 1 6 Some random: 1762080286732.979
4 2 2 6 Some random: 1762080286734.473
1 2 0.5 3 Some random: 1762080286731.057
2 3 0.67 5 Some random: 1762080286732.641
2 3 0.67 5 Some random: 1762080286732.523
3 4 0.75 7 Some random: 1762080286732.360
1 2 0.5 3 Some random: 1762080286733.691
7 3 2.33 10 Some random: 1762080286738.591
34 12 2.83 46 Some random: 1762080286756.055
2 3 0.67 5 Some random: 1762080286734.544
1 1 1 2 Some random: 1762080286735.880
12,56 2,44 12 Expression: [(12,56 + 2,44)] could not be calculated, Too many numbers or variables Some random: 12.05440332082723541762080286779
1 2 0.5 3 Some random: 1762080286734.677
10 5 2 15 Some random: 1762080286741.708
2 2 1 4 Some random: 1762080286736.772
4 5 0.8 9 Some random: 1762080286735.448
1 2 0.5 3 Some random: 1762080286735.240
3 5 0.6 8 Some random: 1762080286735.955
1 2 0.5 3 Some random: 1762080286736.171
12 10 1.2 22 Some random: 1762080286739.339
1 1 1 2 Some random: 1762080286738.360
1 2 0.5 3 Some random: 1762080286737.359
123 123 1 246 Some random: 1762080286738.932
2 2 1 4 Some random: 1762080286738.438
2 2 1 4 Some random: 1762080286739.230
1 1 1 2 Some random: 1762080286739.536
1 2 0.5 3 Some random: 1762080286738.156
5 3 1.67 8 Some random: 1762080286742.449
1 2 0.5 3 Some random: 1762080286739.382
10 5 2 15 Some random: 1762080286745.132
1 2 0.5 3 Some random: 1762080286740.973
88 8 11 96 Some random: 1762080286821.348
1 2 0.5 3 Some random: 1762080286740.519
1 2 0.5 3 Some random: 1762080286740.499
1 2 0.5 3 Some random: 1762080286741.146
10 2 5 12 Some random: 1762080286750.212
1 2 0.5 3 Some random: 1762080286741.707
`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: 1762080286742.791
4 2 2 6 Some random: 1762080286745.931
4 3 1.33 7 Some random: 1762080286744.306
5 2 2.5 7 Some random: 1762080286747.714
3 4 0.75 7 Some random: 1762080286743.161
1 1 1 2 Some random: 1762080286744.659
134 426 0.31 560 Some random: 1762080286453.711
12 12 1 24 Some random: 1762080286745.062
2 3 0.67 5 Some random: 1762080286744.712



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