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
- Page to demo score calculation using 2 methods
- Using ConfiForms Rule for Field Definition to calculate the sums online
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: 1734796636034.284 |
1 | 2 | 0.5 | 3 | Some random: 1734796636036.457 |
1 | 1 | 1 | 2 | Some random: 1734796636039.489 |
1 | 2 | 0.5 | 3 | Some random: 1734796636040.689 |
4 | 4 | 1 | 8 | Some random: 1734796636042.357 |
4 | 4 | 1 | 8 | Some random: 1734796636043.096 |
7 | 8 | 0.88 | 15 | Some random: 1734796636044.631 |
1 | 2 | 0.5 | 3 | Some random: 1734796636045.191 |
8 | 9 | 0.89 | 17 | Some random: 1734796636046.463 |
4 | 5 | 0.8 | 9 | Some random: 1734796636048.344 |
100 | 1 | 100 | 101 | Some random: 1734796636149.102 |
100 | 1 | 100 | 101 | Some random: 1734796636151.080 |
2 | 3 | 0.67 | 5 | Some random: 1734796636052.972 |
1 | 1 | 1 | 2 | Some random: 1734796636054.023 |
1 | 2 | 0.5 | 3 | Some random: 1734796636054.946 |
10 | 10 | 1 | 20 | Some random: 1734796636056.154 |
1 | 2 | 0.5 | 3 | Some random: 1734796636057.020 |
1 | 1 | 1 | 2 | Some random: 1734796636059.892 |
100 | 50 | 2 | 150 | Some random: 1734796636110.548 |
1 | 2 | 0.5 | 3 | Some random: 1734796636060.349 |
11 | 13 | 0.85 | 24 | Some random: 1734796636060.562 |
23 | 44 | 0.52 | 67 | Some random: 1734796636042.300 |
1 | 2 | 0.5 | 3 | Some random: 1734796636063.973 |
1 | 3 | 0.33 | 4 | Some random: 1734796636063.215 |
5 | 5 | 1 | 10 | Some random: 1734796636067.542 |
20 | 20 | 1 | 40 | Some random: 1734796636068.631 |
1 | 1 | 1 | 2 | Some random: 1734796636069.338 |
1 | 2 | 0.5 | 3 | Some random: 1734796636070.061 |
1 | 3 | 0.33 | 4 | Some random: 1734796636071.602 |
1 | 2 | 0.5 | 3 | Some random: 1734796636073.300 |
5 | 5 | 1 | 10 | Some random: 1734796636076.109 |
10 | 2 | 5 | 12 | Some random: 1734796636085.845 |
2 | 2 | 1 | 4 | Some random: 1734796636078.553 |
5 | 4 | 1.25 | 9 | Some random: 1734796636080.113 |
3 | 2 | 1.5 | 5 | Some random: 1734796636254.326 |
1 | 2 | 0.5 | 3 | Some random: 1734796636254.395 |
2 | 2 | 1 | 4 | Some random: 1734796636257.499 |
5 | 5 | 1 | 10 | Some random: 1734796636259.994 |
3 | 3 | 1 | 6 | Some random: 1734796636260.293 |
22 | 100 | 0.22 | 122 | Some random: 1734796636183.669 |
3 | 3 | 1 | 6 | Some random: 1734796636263.136 |
1 | 2 | 0.5 | 3 | Some random: 1734796636263.447 |
1 | 1 | 1 | 2 | Some random: 1734796636266.177 |
1 | 0 | 0 | 1 | Some random: 1734796636268.623 |
1 | 2 | 0.5 | 3 | Some random: 1734796636267.207 |
1 | 1 | 1 | 2 | Some random: 1734796636270.636 |
33 | 33 | 1 | 66 | Some random: 1734796636271.317 |
545 | 556 | 0.98 | 1101 | Some random: 1734796636262.659 |
545 | 556 | 0.98 | 1101 | Some random: 1734796636263.562 |
3 | 6 | 0.5 | 9 | Some random: 1734796636272.612 |
1 | 2 | 0.5 | 3 | Some random: 1734796636276.757 |
20 | 10 | 2 | 30 | Some random: 1734796636288.811 |
12 | 12 | 1 | 24 | Some random: 1734796636280.537 |
7 | 5 | 1.4 | 12 | Some random: 1734796636283.082 |
11 | 14 | 0.79 | 25 | Some random: 1734796636279.686 |
1 | 2 | 0.5 | 3 | Some random: 1734796636284.552 |
2 | 2 | 1 | 4 | Some random: 1734796636286.626 |
1 | 2 | 0.5 | 3 | Some random: 1734796636286.058 |
24 | 1 | 24 | 25 | Some random: 1734796636312.005 |
13 | 13 | 1 | 26 | Some random: 1734796636290.574 |
100 | 10 | 10 | 110 | Some random: 1734796636382.529 |
2 | 2 | 1 | 4 | Some random: 1734796636293.876 |
5 | 0 | 0 | 5 | Some random: 1734796636300.201 |
0 | 1 | 0 | 1 | Some random: 1734796636296.968 |
5 | 5 | 1 | 10 | Some random: 1734796636298.706 |
2 | 2 | 1 | 4 | Some random: 1734796636299.381 |
-2 | 2 | -1 | 0 | Some random: 1734796636296.084 |
8 | 9 | 0.89 | 17 | Some random: 1734796636301.979 |
15 | 1 | 15 | 16 | Some random: 1734796636317.502 |
1 | 1 | 1 | 2 | Some random: 1734796636304.504 |
1 | 1 | 1 | 2 | Some random: 1734796636306.691 |
1 | 1 | 1 | 2 | Some random: 1734796636307.924 |
1 | 2 | 0.5 | 3 | Some random: 1734796636308.766 |
45 | 5 | 9 | 50 | Some random: 1734796636350.073 |
2 | 2 | 1 | 4 | Some random: 1734796636311.864 |
2 | 2 | 1 | 4 | Some random: 1734796636312.909 |
5 | 10 | 0.5 | 15 | Some random: 1734796636307.634 |
3 | 2 | 1.5 | 5 | Some random: 1734796636314.467 |
11 | 13 | 0.85 | 24 | Some random: 1734796636312.571 |
22 | 22 | 1 | 44 | Some random: 1734796636316.702 |
2 | 2 | 1 | 4 | Some random: 1734796636318.802 |
1 | 2 | 0.5 | 3 | Some random: 1734796636318.631 |
5 | 5 | 1 | 10 | Some random: 1734796636320.035 |
6 | 125 | 0.05 | 131 | Some random: 1734796636203.492 |
23 | 32312 | 0 | 32335 | Some random: 1734796604037.206 |
1 | 1 | 1 | 2 | Some random: 1734796636327.054 |
1 | 2 | 0.5 | 3 | Some random: 1734796636327.146 |
2 | 2 | 1 | 4 | Some random: 1734796636330.287 |
100 | 200 | 0.5 | 300 | Some random: 1734796636231.463 |
2 | 2 | 1 | 4 | Some random: 1734796636332.536 |
3 | 5 | 0.6 | 8 | Some random: 1734796636332.399 |
3 | 4 | 0.75 | 7 | Some random: 1734796636336.403 |
1 | 2 | 0.5 | 3 | Some random: 1734796636338.849 |
1 | 2 | 0.5 | 3 | Some random: 1734796636339.968 |
5 | 8 | 0.62 | 13 | Some random: 1734796636338.847 |
3 | 8 | 0.38 | 11 | Some random: 1734796636338.814 |
1 | 1 | 1 | 2 | Some random: 1734796636345.835 |
5 | 3 | 1.67 | 8 | Some random: 1734796636348.876 |
10 | 5 | 2 | 15 | Some random: 1734796636353.148 |
1 | 2 | 0.5 | 3 | Some random: 1734796636348.146 |
2 | 2 | 1 | 4 | Some random: 1734796636350.428 |
2 | 123 | 0.02 | 125 | Some random: 1734796636231.201 |
480 | 60 | 8 | 540 | Some random: 1734796636772.812 |
300 | 20 | 15 | 320 | Some random: 1734796636633.757 |
123 | 321 | 0.38 | 444 | Some random: 1734796636156.638 |
6 | 509 | 0.01 | 515 | Some random: 1734796635852.629 |
10 | 5 | 2 | 15 | Some random: 1734796636361.179 |
([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: 1734796636261.627 |
3 | 4 | 0.75 | 7 | Some random: 1734796636361.414 |
1 | 2 | 0.5 | 3 | Some random: 1734796636362.796 |
3 | 3 | 1 | 6 | Some random: 1734796636364.502 |
2 | 5 | 0.4 | 7 | Some random: 1734796636362.789 |
25.00 | 25.00 | 1 | 50 | Some random: 1734796636367.300 |
555 | 666 | 0.83 | 1221 | Some random: 1734796636257.879 |
2 | 4 | 0.5 | 6 | Some random: 1734796636367.733 |
2 | 3 | 0.67 | 5 | Some random: 1734796636369.609 |
2 | 4 | 0.5 | 6 | Some random: 1734796636370.858 |
1 | 1 | 1 | 2 | Some random: 1734796636373.392 |
7,8 | 3,6 | 7 | Expression: [(7,8 + 3,6)] could not be calculated, Too many numbers or variables | Some random: 7.26424892199906851734796636380 |
55 | 40 | 1.38 | 95 | Some random: 1734796636390.542 |
2 | 8 | 0.25 | 10 | Some random: 1734796636371.676 |
3 | 4 | 0.75 | 7 | Some random: 1734796636377.484 |
1 | 2 | 0.5 | 3 | Some random: 1734796636378.930 |
3 | 4 | 0.75 | 7 | Some random: 1734796636379.890 |
1 | 2 | 0.5 | 3 | Some random: 1734796636380.341 |
20 | 10 | 2 | 30 | Some random: 1734796636392.707 |
3 | 4 | 0.75 | 7 | Some random: 1734796636383.028 |
4 | 5 | 0.8 | 9 | Some random: 1734796636384.712 |
5 | 4 | 1.25 | 9 | Some random: 1734796636387.375 |
1 | 1 | 1 | 2 | Some random: 1734796636387.961 |
1 | 2 | 0.5 | 3 | Some random: 1734796636387.983 |
5 | 5 | 1 | 10 | Some random: 1734796636389.261 |
3 | 2 | 1.5 | 5 | Some random: 1734796636391.493 |
1 | 0.30 | 3.33 | 1.3 | Some random: 1734796636393.035 |
1 | 2 | 0.5 | 3 | Some random: 1734796636392.554 |
1 | 3 | 0.33 | 4 | Some random: 1734796636392.220 |
1 | 2 | 0.5 | 3 | Some random: 1734796636394.951 |
5 | 20 | 0.25 | 25 | Some random: 1734796636381.614 |
3 | 3 | 1 | 6 | Some random: 1734796636397.150 |
4 | 2 | 2 | 6 | Some random: 1734796636400.608 |
1 | 2 | 0.5 | 3 | Some random: 1734796636399.973 |
2 | 3 | 0.67 | 5 | Some random: 1734796636400.520 |
2 | 3 | 0.67 | 5 | Some random: 1734796636401.916 |
3 | 4 | 0.75 | 7 | Some random: 1734796636401.384 |
1 | 2 | 0.5 | 3 | Some random: 1734796636403.432 |
7 | 3 | 2.33 | 10 | Some random: 1734796636409.171 |
34 | 12 | 2.83 | 46 | Some random: 1734796636428.728 |
2 | 3 | 0.67 | 5 | Some random: 1734796636406.712 |
1 | 1 | 1 | 2 | Some random: 1734796636409.991 |
12,56 | 2,44 | 12 | Expression: [(12,56 + 2,44)] could not be calculated, Too many numbers or variables | Some random: 12.78704683844935541734796636454 |
1 | 2 | 0.5 | 3 | Some random: 1734796636410.140 |
10 | 5 | 2 | 15 | Some random: 1734796636418.316 |
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>