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: 1777333450554.357
1 2 0.5 3 Some random: 1777333450555.708
1 1 1 2 Some random: 1777333450556.883
1 2 0.5 3 Some random: 1777333450556.096
4 4 1 8 Some random: 1777333450558.786
4 4 1 8 Some random: 1777333450559.763
7 8 0.88 15 Some random: 1777333450559.799
1 2 0.5 3 Some random: 1777333450560.672
8 9 0.89 17 Some random: 1777333450560.379
4 5 0.8 9 Some random: 1777333450561.511
100 1 100 101 Some random: 1777333450662.420
100 1 100 101 Some random: 1777333450663.562
2 3 0.67 5 Some random: 1777333450564.666
1 1 1 2 Some random: 1777333450566.486
1 2 0.5 3 Some random: 1777333450566.806
10 10 1 20 Some random: 1777333450568.929
1 2 0.5 3 Some random: 1777333450568.489
1 1 1 2 Some random: 1777333450570.569
100 50 2 150 Some random: 1777333450621.235
1 2 0.5 3 Some random: 1777333450571.684
11 13 0.85 24 Some random: 1777333450571.283
23 44 0.52 67 Some random: 1777333450553.461
1 2 0.5 3 Some random: 1777333450574.732
1 3 0.33 4 Some random: 1777333450574.366
5 5 1 10 Some random: 1777333450576.797
20 20 1 40 Some random: 1777333450577.196
1 1 1 2 Some random: 1777333450578.060
1 2 0.5 3 Some random: 1777333450578.996
1 3 0.33 4 Some random: 1777333450578.193
1 2 0.5 3 Some random: 1777333450580.351
5 5 1 10 Some random: 1777333450582.698
10 2 5 12 Some random: 1777333450591.563
2 2 1 4 Some random: 1777333450584.785
5 4 1.25 9 Some random: 1777333450586.548
3 2 1.5 5 Some random: 1777333450587.029
1 2 0.5 3 Some random: 1777333450585.778
2 2 1 4 Some random: 1777333450587.951
5 5 1 10 Some random: 1777333450588.110
3 3 1 6 Some random: 1777333450588.146
22 100 0.22 122 Some random: 1777333450511.454
3 3 1 6 Some random: 1777333450590.166
1 2 0.5 3 Some random: 1777333450590.207
1 1 1 2 Some random: 1777333450591.447
1 0 0 1 Some random: 1777333450593.447
1 2 0.5 3 Some random: 1777333450592.421
1 1 1 2 Some random: 1777333450593.672
33 33 1 66 Some random: 1777333450594.462
545 556 0.98 1101 Some random: 1777333450584.360
545 556 0.98 1101 Some random: 1777333450584.771
3 6 0.5 9 Some random: 1777333450593.702
1 2 0.5 3 Some random: 1777333450596.150
20 10 2 30 Some random: 1777333450607.352
12 12 1 24 Some random: 1777333450598.146
7 5 1.4 12 Some random: 1777333450600.061
11 14 0.79 25 Some random: 1777333450596.254
1 2 0.5 3 Some random: 1777333450599.216
2 2 1 4 Some random: 1777333450600.088
1 2 0.5 3 Some random: 1777333450600.004
24 1 24 25 Some random: 1777333450624.162
13 13 1 26 Some random: 1777333450602.611
100 10 10 110 Some random: 1777333450693.534
2 2 1 4 Some random: 1777333450603.096
5 0 0 5 Some random: 1777333450609.120
0 1 0 1 Some random: 1777333450604.713
5 5 1 10 Some random: 1777333450605.349
2 2 1 4 Some random: 1777333450606.282
-2 2 -1 0 Some random: 1777333450603.587
8 9 0.89 17 Some random: 1777333450606.804
15 1 15 16 Some random: 1777333450622.864
1 1 1 2 Some random: 1777333450609.073
1 1 1 2 Some random: 1777333450609.959
1 1 1 2 Some random: 1777333450610.321
1 2 0.5 3 Some random: 1777333450610.271
45 5 9 50 Some random: 1777333450651.443
2 2 1 4 Some random: 1777333450612.918
2 2 1 4 Some random: 1777333450612.633
5 10 0.5 15 Some random: 1777333450608.372
3 2 1.5 5 Some random: 1777333450615.121
11 13 0.85 24 Some random: 1777333450612.145
22 22 1 44 Some random: 1777333450615.428
2 2 1 4 Some random: 1777333450616.849
1 2 0.5 3 Some random: 1777333450615.261
5 5 1 10 Some random: 1777333450617.223
6 125 0.05 131 Some random: 1777333450499.898
23 32312 0 32335 Some random: 1777333418329.900
1 1 1 2 Some random: 1777333450619.103
1 2 0.5 3 Some random: 1777333450619.136
2 2 1 4 Some random: 1777333450621.049
100 200 0.5 300 Some random: 1777333450522.821
2 2 1 4 Some random: 1777333450623.111
3 5 0.6 8 Some random: 1777333450622.874
3 4 0.75 7 Some random: 1777333450624.383
1 2 0.5 3 Some random: 1777333450625.893
1 2 0.5 3 Some random: 1777333450626.260
5 8 0.62 13 Some random: 1777333450625.323
3 8 0.38 11 Some random: 1777333450623.851
1 1 1 2 Some random: 1777333450629.682
5 3 1.67 8 Some random: 1777333450632.606
10 5 2 15 Some random: 1777333450636.787
1 2 0.5 3 Some random: 1777333450631.502
2 2 1 4 Some random: 1777333450633.723
2 123 0.02 125 Some random: 1777333450513.974
480 60 8 540 Some random: 1777333451055.200
300 20 15 320 Some random: 1777333450915.443
123 321 0.38 444 Some random: 1777333450438.383
6 509 0.01 515 Some random: 1777333450133.666
10 5 2 15 Some random: 1777333450642.346
([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: 1777333450539.802
3 4 0.75 7 Some random: 1777333450639.598
1 2 0.5 3 Some random: 1777333450640.337
3 3 1 6 Some random: 1777333450642.153
2 5 0.4 7 Some random: 1777333450639.177
25.00 25.00 1 50 Some random: 1777333450643.087
555 666 0.83 1221 Some random: 1777333450533.808
2 4 0.5 6 Some random: 1777333450642.459
2 3 0.67 5 Some random: 1777333450644.664
2 4 0.5 6 Some random: 1777333450644.580
1 1 1 2 Some random: 1777333450647.420
7,8 3,6 7 Expression: [(7,8 + 3,6)] could not be calculated, Too many numbers or variables Some random: 7.45852020765744551777333450653
55 40 1.38 95 Some random: 1777333450663.909
2 8 0.25 10 Some random: 1777333450642.619
3 4 0.75 7 Some random: 1777333450648.686
1 2 0.5 3 Some random: 1777333450649.439
3 4 0.75 7 Some random: 1777333450650.816
1 2 0.5 3 Some random: 1777333450651.432
20 10 2 30 Some random: 1777333450662.410
3 4 0.75 7 Some random: 1777333450652.279
4 5 0.8 9 Some random: 1777333450653.462
5 4 1.25 9 Some random: 1777333450656.480
1 1 1 2 Some random: 1777333450656.171
1 2 0.5 3 Some random: 1777333450656.644
5 5 1 10 Some random: 1777333450658.487
3 2 1.5 5 Some random: 1777333450660.325
1 0.30 3.33 1.3 Some random: 1777333450660.716
1 2 0.5 3 Some random: 1777333450660.749
1 3 0.33 4 Some random: 1777333450660.753
1 2 0.5 3 Some random: 1777333450662.553
5 20 0.25 25 Some random: 1777333450649.510
3 3 1 6 Some random: 1777333450664.080
4 2 2 6 Some random: 1777333450667.311
1 2 0.5 3 Some random: 1777333450665.655
2 3 0.67 5 Some random: 1777333450666.822
2 3 0.67 5 Some random: 1777333450667.454
3 4 0.75 7 Some random: 1777333450668.813
1 2 0.5 3 Some random: 1777333450669.899
7 3 2.33 10 Some random: 1777333450675.341
34 12 2.83 46 Some random: 1777333450694.396
2 3 0.67 5 Some random: 1777333450671.330
1 1 1 2 Some random: 1777333450673.458
12,56 2,44 12 Expression: [(12,56 + 2,44)] could not be calculated, Too many numbers or variables Some random: 12.47484177800863541777333450718
1 2 0.5 3 Some random: 1777333450674.862
10 5 2 15 Some random: 1777333450681.165
2 2 1 4 Some random: 1777333450676.243
4 5 0.8 9 Some random: 1777333450676.600
1 2 0.5 3 Some random: 1777333450677.969
3 5 0.6 8 Some random: 1777333450677.678
1 2 0.5 3 Some random: 1777333450679.195
12 10 1.2 22 Some random: 1777333450682.885
1 1 1 2 Some random: 1777333450681.548
1 2 0.5 3 Some random: 1777333450681.287
123 123 1 246 Some random: 1777333450682.048
2 2 1 4 Some random: 1777333450683.609
2 2 1 4 Some random: 1777333450684.015
1 1 1 2 Some random: 1777333450685.823
1 2 0.5 3 Some random: 1777333450684.902
5 3 1.67 8 Some random: 1777333450688.839
1 2 0.5 3 Some random: 1777333450686.248
10 5 2 15 Some random: 1777333450692.139
1 2 0.5 3 Some random: 1777333450687.311
88 8 11 96 Some random: 1777333450769.886
1 2 0.5 3 Some random: 1777333450689.932
1 2 0.5 3 Some random: 1777333450689.425
1 2 0.5 3 Some random: 1777333450690.961
10 2 5 12 Some random: 1777333450700.691
1 2 0.5 3 Some random: 1777333450691.085
`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: 1777333450693.962
4 2 2 6 Some random: 1777333450696.433
4 3 1.33 7 Some random: 1777333450696.444
5 2 2.5 7 Some random: 1777333450699.292
3 4 0.75 7 Some random: 1777333450695.199
1 1 1 2 Some random: 1777333450697.993
134 426 0.31 560 Some random: 1777333450406.038
12 12 1 24 Some random: 1777333450698.513
2 3 0.67 5 Some random: 1777333450698.837
10 20 0.5 30 Some random: 1777333450690.825
1 2 0.5 3 Some random: 1777333450699.635



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