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: 1768920783634.636
1 2 0.5 3 Some random: 1768920783633.750
1 1 1 2 Some random: 1768920783635.753
1 2 0.5 3 Some random: 1768920783634.819
4 4 1 8 Some random: 1768920783636.789
4 4 1 8 Some random: 1768920783636.091
7 8 0.88 15 Some random: 1768920783635.851
1 2 0.5 3 Some random: 1768920783636.297
8 9 0.89 17 Some random: 1768920783636.448
4 5 0.8 9 Some random: 1768920783637.938
100 1 100 101 Some random: 1768920783737.734
100 1 100 101 Some random: 1768920783738.023
2 3 0.67 5 Some random: 1768920783638.220
1 1 1 2 Some random: 1768920783639.196
1 2 0.5 3 Some random: 1768920783639.387
10 10 1 20 Some random: 1768920783640.028
1 2 0.5 3 Some random: 1768920783639.021
1 1 1 2 Some random: 1768920783641.635
100 50 2 150 Some random: 1768920783691.086
1 2 0.5 3 Some random: 1768920783641.035
11 13 0.85 24 Some random: 1768920783640.085
23 44 0.52 67 Some random: 1768920783621.945
1 2 0.5 3 Some random: 1768920783642.565
1 3 0.33 4 Some random: 1768920783641.917
5 5 1 10 Some random: 1768920783643.433
20 20 1 40 Some random: 1768920783644.396
1 1 1 2 Some random: 1768920783644.328
1 2 0.5 3 Some random: 1768920783644.519
1 3 0.33 4 Some random: 1768920783643.474
1 2 0.5 3 Some random: 1768920783644.264
5 5 1 10 Some random: 1768920783646.190
10 2 5 12 Some random: 1768920783654.000
2 2 1 4 Some random: 1768920783647.941
5 4 1.25 9 Some random: 1768920783648.198
3 2 1.5 5 Some random: 1768920783648.212
1 2 0.5 3 Some random: 1768920783647.047
2 2 1 4 Some random: 1768920783648.208
5 5 1 10 Some random: 1768920783649.275
3 3 1 6 Some random: 1768920783649.008
22 100 0.22 122 Some random: 1768920783571.464
3 3 1 6 Some random: 1768920783650.135
1 2 0.5 3 Some random: 1768920783649.557
1 1 1 2 Some random: 1768920783651.074
1 0 0 1 Some random: 1768920783652.908
1 2 0.5 3 Some random: 1768920783650.988
1 1 1 2 Some random: 1768920783652.598
33 33 1 66 Some random: 1768920783652.148
545 556 0.98 1101 Some random: 1768920783642.781
545 556 0.98 1101 Some random: 1768920783642.647
3 6 0.5 9 Some random: 1768920783650.491
1 2 0.5 3 Some random: 1768920783653.832
20 10 2 30 Some random: 1768920783664.569
12 12 1 24 Some random: 1768920783654.275
7 5 1.4 12 Some random: 1768920783657.734
11 14 0.79 25 Some random: 1768920783652.668
1 2 0.5 3 Some random: 1768920783654.276
2 2 1 4 Some random: 1768920783656.845
1 2 0.5 3 Some random: 1768920783655.385
24 1 24 25 Some random: 1768920783680.600
13 13 1 26 Some random: 1768920783657.907
100 10 10 110 Some random: 1768920783747.461
2 2 1 4 Some random: 1768920783658.746
5 0 0 5 Some random: 1768920783663.300
0 1 0 1 Some random: 1768920783657.375
5 5 1 10 Some random: 1768920783659.170
2 2 1 4 Some random: 1768920783659.078
-2 2 -1 0 Some random: 1768920783655.150
8 9 0.89 17 Some random: 1768920783659.601
15 1 15 16 Some random: 1768920783674.093
1 1 1 2 Some random: 1768920783661.646
1 1 1 2 Some random: 1768920783661.744
1 1 1 2 Some random: 1768920783661.037
1 2 0.5 3 Some random: 1768920783661.009
45 5 9 50 Some random: 1768920783702.745
2 2 1 4 Some random: 1768920783663.689
2 2 1 4 Some random: 1768920783663.299
5 10 0.5 15 Some random: 1768920783658.200
3 2 1.5 5 Some random: 1768920783665.219
11 13 0.85 24 Some random: 1768920783662.104
22 22 1 44 Some random: 1768920783665.134
2 2 1 4 Some random: 1768920783665.292
1 2 0.5 3 Some random: 1768920783664.383
5 5 1 10 Some random: 1768920783666.671
6 125 0.05 131 Some random: 1768920783547.453
23 32312 0 32335 Some random: 1768920751378.999
1 1 1 2 Some random: 1768920783667.192
1 2 0.5 3 Some random: 1768920783666.322
2 2 1 4 Some random: 1768920783668.769
100 200 0.5 300 Some random: 1768920783568.200
2 2 1 4 Some random: 1768920783668.964
3 5 0.6 8 Some random: 1768920783667.621
3 4 0.75 7 Some random: 1768920783668.941
1 2 0.5 3 Some random: 1768920783669.520
1 2 0.5 3 Some random: 1768920783669.952
5 8 0.62 13 Some random: 1768920783667.704
3 8 0.38 11 Some random: 1768920783666.799
1 1 1 2 Some random: 1768920783671.648
5 3 1.67 8 Some random: 1768920783673.586
10 5 2 15 Some random: 1768920783677.197
1 2 0.5 3 Some random: 1768920783671.859
2 2 1 4 Some random: 1768920783673.937
2 123 0.02 125 Some random: 1768920783552.266
480 60 8 540 Some random: 1768920784093.874
300 20 15 320 Some random: 1768920783954.053
123 321 0.38 444 Some random: 1768920783476.471
6 509 0.01 515 Some random: 1768920783172.172
10 5 2 15 Some random: 1768920783680.948
([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: 1768920783576.114
3 4 0.75 7 Some random: 1768920783675.636
1 2 0.5 3 Some random: 1768920783675.668
3 3 1 6 Some random: 1768920783677.780
2 5 0.4 7 Some random: 1768920783674.019
25.00 25.00 1 50 Some random: 1768920783678.447
555 666 0.83 1221 Some random: 1768920783567.543
2 4 0.5 6 Some random: 1768920783676.513
2 3 0.67 5 Some random: 1768920783678.691
2 4 0.5 6 Some random: 1768920783677.302
1 1 1 2 Some random: 1768920783680.485
7,8 3,6 7 Expression: [(7,8 + 3,6)] could not be calculated, Too many numbers or variables Some random: 7.56782935878660051768920783686
55 40 1.38 95 Some random: 1768920783695.973
2 8 0.25 10 Some random: 1768920783675.587
3 4 0.75 7 Some random: 1768920783680.933
1 2 0.5 3 Some random: 1768920783680.212
3 4 0.75 7 Some random: 1768920783681.728
1 2 0.5 3 Some random: 1768920783681.573
20 10 2 30 Some random: 1768920783692.662
3 4 0.75 7 Some random: 1768920783682.450
4 5 0.8 9 Some random: 1768920783682.843
5 4 1.25 9 Some random: 1768920783685.338
1 1 1 2 Some random: 1768920783684.248
1 2 0.5 3 Some random: 1768920783683.266
5 5 1 10 Some random: 1768920783685.775
3 2 1.5 5 Some random: 1768920783686.029
1 0.30 3.33 1.3 Some random: 1768920783686.560
1 2 0.5 3 Some random: 1768920783685.894
1 3 0.33 4 Some random: 1768920783684.276
1 2 0.5 3 Some random: 1768920783685.629
5 20 0.25 25 Some random: 1768920783672.662
3 3 1 6 Some random: 1768920783687.110
4 2 2 6 Some random: 1768920783689.868
1 2 0.5 3 Some random: 1768920783687.568
2 3 0.67 5 Some random: 1768920783687.488
2 3 0.67 5 Some random: 1768920783688.744
3 4 0.75 7 Some random: 1768920783688.683
1 2 0.5 3 Some random: 1768920783688.891
7 3 2.33 10 Some random: 1768920783694.330
34 12 2.83 46 Some random: 1768920783712.529
2 3 0.67 5 Some random: 1768920783689.296
1 1 1 2 Some random: 1768920783691.441
12,56 2,44 12 Expression: [(12,56 + 2,44)] could not be calculated, Too many numbers or variables Some random: 12.63092174282150541768920783735
1 2 0.5 3 Some random: 1768920783691.113
10 5 2 15 Some random: 1768920783697.263
2 2 1 4 Some random: 1768920783692.488
4 5 0.8 9 Some random: 1768920783692.324
1 2 0.5 3 Some random: 1768920783692.588
3 5 0.6 8 Some random: 1768920783691.189
1 2 0.5 3 Some random: 1768920783693.486
12 10 1.2 22 Some random: 1768920783696.059
1 1 1 2 Some random: 1768920783694.148
1 2 0.5 3 Some random: 1768920783694.250
123 123 1 246 Some random: 1768920783695.210
2 2 1 4 Some random: 1768920783695.078
2 2 1 4 Some random: 1768920783696.567
1 1 1 2 Some random: 1768920783696.307
1 2 0.5 3 Some random: 1768920783695.350
5 3 1.67 8 Some random: 1768920783699.756
1 2 0.5 3 Some random: 1768920783696.016
10 5 2 15 Some random: 1768920783703.899
1 2 0.5 3 Some random: 1768920783697.728
88 8 11 96 Some random: 1768920783778.920
1 2 0.5 3 Some random: 1768920783698.393
1 2 0.5 3 Some random: 1768920783698.661
1 2 0.5 3 Some random: 1768920783698.729
10 2 5 12 Some random: 1768920783708.660
1 2 0.5 3 Some random: 1768920783699.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: 1768920783700.960
4 2 2 6 Some random: 1768920783703.185
4 3 1.33 7 Some random: 1768920783703.512
5 2 2.5 7 Some random: 1768920783705.282
3 4 0.75 7 Some random: 1768920783701.836
1 1 1 2 Some random: 1768920783703.910
134 426 0.31 560 Some random: 1768920783411.564
12 12 1 24 Some random: 1768920783703.500
2 3 0.67 5 Some random: 1768920783703.642
10 20 0.5 30 Some random: 1768920783694.331
1 2 0.5 3 Some random: 1768920783703.255



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