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: 1767179509948.778
1 2 0.5 3 Some random: 1767179509947.854
1 1 1 2 Some random: 1767179509949.323
1 2 0.5 3 Some random: 1767179509948.797
4 4 1 8 Some random: 1767179509950.434
4 4 1 8 Some random: 1767179509950.527
7 8 0.88 15 Some random: 1767179509950.287
1 2 0.5 3 Some random: 1767179509950.152
8 9 0.89 17 Some random: 1767179509951.115
4 5 0.8 9 Some random: 1767179509951.888
100 1 100 101 Some random: 1767179510052.793
100 1 100 101 Some random: 1767179510052.899
2 3 0.67 5 Some random: 1767179509953.340
1 1 1 2 Some random: 1767179509954.999
1 2 0.5 3 Some random: 1767179509954.051
10 10 1 20 Some random: 1767179509955.549
1 2 0.5 3 Some random: 1767179509955.557
1 1 1 2 Some random: 1767179509956.310
100 50 2 150 Some random: 1767179510007.513
1 2 0.5 3 Some random: 1767179509956.742
11 13 0.85 24 Some random: 1767179509956.203
23 44 0.52 67 Some random: 1767179509937.524
1 2 0.5 3 Some random: 1767179509958.972
1 3 0.33 4 Some random: 1767179509957.143
5 5 1 10 Some random: 1767179509960.845
20 20 1 40 Some random: 1767179509960.398
1 1 1 2 Some random: 1767179509961.764
1 2 0.5 3 Some random: 1767179509960.884
1 3 0.33 4 Some random: 1767179509960.681
1 2 0.5 3 Some random: 1767179509961.748
5 5 1 10 Some random: 1767179509963.130
10 2 5 12 Some random: 1767179509971.756
2 2 1 4 Some random: 1767179509963.197
5 4 1.25 9 Some random: 1767179509965.327
3 2 1.5 5 Some random: 1767179509965.921
1 2 0.5 3 Some random: 1767179509964.471
2 2 1 4 Some random: 1767179509965.787
5 5 1 10 Some random: 1767179509966.356
3 3 1 6 Some random: 1767179509966.860
22 100 0.22 122 Some random: 1767179509888.650
3 3 1 6 Some random: 1767179509967.443
1 2 0.5 3 Some random: 1767179509966.233
1 1 1 2 Some random: 1767179509968.538
1 0 0 1 Some random: 1767179509969.582
1 2 0.5 3 Some random: 1767179509968.455
1 1 1 2 Some random: 1767179509969.340
33 33 1 66 Some random: 1767179509970.135
545 556 0.98 1101 Some random: 1767179509959.465
545 556 0.98 1101 Some random: 1767179509959.186
3 6 0.5 9 Some random: 1767179509968.934
1 2 0.5 3 Some random: 1767179509970.654
20 10 2 30 Some random: 1767179509982.571
12 12 1 24 Some random: 1767179509972.614
7 5 1.4 12 Some random: 1767179509975.823
11 14 0.79 25 Some random: 1767179509970.075
1 2 0.5 3 Some random: 1767179509972.691
2 2 1 4 Some random: 1767179509974.276
1 2 0.5 3 Some random: 1767179509973.899
24 1 24 25 Some random: 1767179509998.439
13 13 1 26 Some random: 1767179509975.313
100 10 10 110 Some random: 1767179510065.699
2 2 1 4 Some random: 1767179509976.628
5 0 0 5 Some random: 1767179509981.320
0 1 0 1 Some random: 1767179509976.208
5 5 1 10 Some random: 1767179509977.150
2 2 1 4 Some random: 1767179509977.284
-2 2 -1 0 Some random: 1767179509974.542
8 9 0.89 17 Some random: 1767179509977.475
15 1 15 16 Some random: 1767179509993.781
1 1 1 2 Some random: 1767179509979.053
1 1 1 2 Some random: 1767179509980.262
1 1 1 2 Some random: 1767179509980.656
1 2 0.5 3 Some random: 1767179509980.853
45 5 9 50 Some random: 1767179510021.126
2 2 1 4 Some random: 1767179509982.760
2 2 1 4 Some random: 1767179509982.231
5 10 0.5 15 Some random: 1767179509977.729
3 2 1.5 5 Some random: 1767179509984.565
11 13 0.85 24 Some random: 1767179509981.356
22 22 1 44 Some random: 1767179509984.645
2 2 1 4 Some random: 1767179509984.771
1 2 0.5 3 Some random: 1767179509984.022
5 5 1 10 Some random: 1767179509985.876
6 125 0.05 131 Some random: 1767179509867.051
23 32312 0 32335 Some random: 1767179477697.094
1 1 1 2 Some random: 1767179509987.364
1 2 0.5 3 Some random: 1767179509986.024
2 2 1 4 Some random: 1767179509988.099
100 200 0.5 300 Some random: 1767179509888.387
2 2 1 4 Some random: 1767179509989.879
3 5 0.6 8 Some random: 1767179509987.801
3 4 0.75 7 Some random: 1767179509989.463
1 2 0.5 3 Some random: 1767179509989.629
1 2 0.5 3 Some random: 1767179509989.021
5 8 0.62 13 Some random: 1767179509988.869
3 8 0.38 11 Some random: 1767179509986.224
1 1 1 2 Some random: 1767179509992.614
5 3 1.67 8 Some random: 1767179509994.565
10 5 2 15 Some random: 1767179509997.361
1 2 0.5 3 Some random: 1767179509992.931
2 2 1 4 Some random: 1767179509994.627
2 123 0.02 125 Some random: 1767179509873.667
480 60 8 540 Some random: 1767179510414.193
300 20 15 320 Some random: 1767179510275.892
123 321 0.38 444 Some random: 1767179509798.495
6 509 0.01 515 Some random: 1767179509493.543
10 5 2 15 Some random: 1767179510001.360
([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: 1767179509897.247
3 4 0.75 7 Some random: 1767179509997.503
1 2 0.5 3 Some random: 1767179509997.403
3 3 1 6 Some random: 1767179509999.065
2 5 0.4 7 Some random: 1767179509996.453
25.00 25.00 1 50 Some random: 1767179509999.334
555 666 0.83 1221 Some random: 1767179509889.817
2 4 0.5 6 Some random: 1767179509998.771
2 3 0.67 5 Some random: 1767179510000.077
2 4 0.5 6 Some random: 1767179509999.295
1 1 1 2 Some random: 1767179510002.930
7,8 3,6 7 Expression: [(7,8 + 3,6)] could not be calculated, Too many numbers or variables Some random: 7.42263935167574851767179510008
55 40 1.38 95 Some random: 1767179510018.237
2 8 0.25 10 Some random: 1767179509997.548
3 4 0.75 7 Some random: 1767179510003.785
1 2 0.5 3 Some random: 1767179510003.178
3 4 0.75 7 Some random: 1767179510003.557
1 2 0.5 3 Some random: 1767179510004.004
20 10 2 30 Some random: 1767179510015.577
3 4 0.75 7 Some random: 1767179510005.933
4 5 0.8 9 Some random: 1767179510005.285
5 4 1.25 9 Some random: 1767179510007.791
1 1 1 2 Some random: 1767179510007.807
1 2 0.5 3 Some random: 1767179510006.818
5 5 1 10 Some random: 1767179510008.085
3 2 1.5 5 Some random: 1767179510009.959
1 0.30 3.33 1.3 Some random: 1767179510008.888
1 2 0.5 3 Some random: 1767179510008.629
1 3 0.33 4 Some random: 1767179510007.050
1 2 0.5 3 Some random: 1767179510008.164
5 20 0.25 25 Some random: 1767179509995.597
3 3 1 6 Some random: 1767179510010.852
4 2 2 6 Some random: 1767179510013.707
1 2 0.5 3 Some random: 1767179510010.626
2 3 0.67 5 Some random: 1767179510010.593
2 3 0.67 5 Some random: 1767179510011.528
3 4 0.75 7 Some random: 1767179510011.119
1 2 0.5 3 Some random: 1767179510012.545
7 3 2.33 10 Some random: 1767179510017.752
34 12 2.83 46 Some random: 1767179510036.720
2 3 0.67 5 Some random: 1767179510013.727
1 1 1 2 Some random: 1767179510014.538
12,56 2,44 12 Expression: [(12,56 + 2,44)] could not be calculated, Too many numbers or variables Some random: 12.59829855351697541767179510059
1 2 0.5 3 Some random: 1767179510014.748
10 5 2 15 Some random: 1767179510020.201
2 2 1 4 Some random: 1767179510016.348
4 5 0.8 9 Some random: 1767179510015.005
1 2 0.5 3 Some random: 1767179510016.690
3 5 0.6 8 Some random: 1767179510015.457
1 2 0.5 3 Some random: 1767179510016.272
12 10 1.2 22 Some random: 1767179510020.710
1 1 1 2 Some random: 1767179510018.840
1 2 0.5 3 Some random: 1767179510018.911
123 123 1 246 Some random: 1767179510019.262
2 2 1 4 Some random: 1767179510019.044
2 2 1 4 Some random: 1767179510020.980
1 1 1 2 Some random: 1767179510020.232
1 2 0.5 3 Some random: 1767179510019.648
5 3 1.67 8 Some random: 1767179510023.058
1 2 0.5 3 Some random: 1767179510020.336
10 5 2 15 Some random: 1767179510027.121
1 2 0.5 3 Some random: 1767179510021.769
88 8 11 96 Some random: 1767179510102.960
1 2 0.5 3 Some random: 1767179510022.037
1 2 0.5 3 Some random: 1767179510022.098
1 2 0.5 3 Some random: 1767179510023.582
10 2 5 12 Some random: 1767179510032.214
1 2 0.5 3 Some random: 1767179510023.745
`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: 1767179510024.895
4 2 2 6 Some random: 1767179510028.496
4 3 1.33 7 Some random: 1767179510027.672
5 2 2.5 7 Some random: 1767179510029.874
3 4 0.75 7 Some random: 1767179510026.807
1 1 1 2 Some random: 1767179510027.256
134 426 0.31 560 Some random: 1767179509736.863
12 12 1 24 Some random: 1767179510028.492
2 3 0.67 5 Some random: 1767179510027.271
10 20 0.5 30 Some random: 1767179510019.691



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