Page tree
Skip to end of metadata
Go to start of metadata

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 to import this configuration into your Confluence and see it in action

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 2 of formula types

We have the following formulas:

  • ([entry.f1] + [entry.f2])
  • CONCAT("Some random: ", ((RANDOM() + [entry.f1] - [entry.f2] + NOW())))

*
*

Stored data

f1

f2

My formula 1

My formula 2

3 2 5 Some random: 1561582911932.253
-1 3 2 Some random: 1561582911930.960
5 5 10 Some random: 1561582911937.695
10 20 30 Some random: 1561582911930.203
5 7 12 Some random: 1561582911941.665
43 43 86 Some random: 1561582911946.135
3 2 5 Some random: 1561582911950.087
2 3 5 Some random: 1561582911951.379
99 33 132 Some random: 1561582912021.910
3 3 6 Some random: 1561582911958.065
10 20 30 Some random: 1561582911951.802
3 2 5 Some random: 1561582911965.910
1212 1212 2424 Some random: 1561582911967.437
1 2 3 Some random: 1561582911969.107
6 3 9 Some random: 1561582911980.241
4 2 6 Some random: 1561582911984.939
2 5 7 Some random: 1561582911982.731
15 15 30 Some random: 1561582911989.814
12 1 13 Some random: 1561582912003.179
1 2 3 Some random: 1561582911995.149
1 2 3 Some random: 1561582911998.655
1 2 3 Some random: 1561582912001.406
2 2 4 Some random: 1561582912005.320
5 5 10 Some random: 1561582912008.083
12 3 15 Some random: 1561582912020.640
19862 12234 32096 Some random: 1561582919642.930
2 3 5 Some random: 1561582912016.081
2 2 4 Some random: 1561582912020.458
1 2 3 Some random: 1561582912021.582
1 2 3 Some random: 1561582912024.546
2 3 5 Some random: 1561582912027.168
3 2 5 Some random: 1561582912032.731
2 4 6 Some random: 1561582912032.281
12 13 25 Some random: 1561582912036.481
9 2 11 Some random: 1561582912047.818
2 2 4 Some random: 1561582912043.369
1 2 3 Some random: 1561582912045.285
123 321 444 Some random: 1561582911851.660
67 78 145 Some random: 1561582912041.534
12 12 24 Some random: 1561582912054.165
1 2 3 Some random: 1561582912056.011
10 10 20 Some random: 1561582912060.706
3 3 6 Some random: 1561582912063.532
1 1 2 Some random: 1561582912066.715
5 5 10 Some random: 1561582912069.123
23 33 56 Some random: 1561582912062.967
25 10 35 Some random: 1561582912090.100
2 4 6 Some random: 1561582912076.622
10 15 25 Some random: 1561582912076.212
555 333 888 Some random: 1561582912306.545
123 321 444 Some random: 1561582911888.559
1 1 2 Some random: 1561582912089.314
1 2 3 Some random: 1561582912091.982
2 3 5 Some random: 1561582912094.798
2143 324 2467 Some random: 1561582913917.533
3 2 5 Some random: 1561582912102.400
20 35 55 Some random: 1561582912089.311
3 5 8 Some random: 1561582912104.643
1 2 3 Some random: 1561582912108.807
2 3 5 Some random: 1561582912111.359
56 8 64 Some random: 1561582912164.731
1 2 3 Some random: 1561582912118.098
1 2 3 Some random: 1561582912121.117
1 2 3 Some random: 1561582912124.947
1 2 3 Some random: 1561582912127.123
1 1 2 Some random: 1561582912131.879
6 7 13 Some random: 1561582912133.853
6 6 12 Some random: 1561582912137.146
3 3 6 Some random: 1561582912140.672
1 2 3 Some random: 1561582912142.555
4 4 8 Some random: 1561582912146.796
1 2 3 Some random: 1561582912148.667
12 12 24 Some random: 1561582912152.406
3 2 5 Some random: 1561582912156.703
8 9 17 Some random: 1561582912157.691
5 2 7 Some random: 1561582912164.948
1 1 2 Some random: 1561582912164.986
1 2 3 Some random: 1561582912166.769
1 5 6 Some random: 1561582912166.677
2 3 5 Some random: 1561582912172.406
10 10 20 Some random: 1561582912176.751
5 5 10 Some random: 1561582912179.806
80 80 160 Some random: 1561582912181.327
5 10 15 Some random: 1561582912179.163
5 7 12 Some random: 1561582912185.411
2 4 6 Some random: 1561582912188.127
808 909 1717 Some random: 1561582912092.330
9 9 18 Some random: 1561582912196.841
2 10 12 Some random: 1561582912190.191
10 10 20 Some random: 1561582912201.920
2 50 52 Some random: 1561582912156.664
6 8 14 Some random: 1561582912205.068
5 2 7 Some random: 1561582912213.686
1 2 3 Some random: 1561582912212.286
4 5 9 Some random: 1561582912215.425
2 2 4 Some random: 1561582912219.249
999999999 -9 999999990 Some random: 1562582912229.154
28 67 95 Some random: 1561582912185.775
1 2 3 Some random: 1561582912226.361
3 2 5 Some random: 1561582912231.783
2 2 4 Some random: 1561582912233.487
1 2 3 Some random: 1561582912235.425
1 2 3 Some random: 1561582912237.554
1 5 6 Some random: 1561582912237.377
2 2 4 Some random: 1561582912244.641
3.5 4.9 8.4 Some random: 1561582912246.107
1 2 3 Some random: 1561582912249.621
1966 2019 3985 Some random: 1561582912200.290
1 2 3 Some random: 1561582912255.875
12345 12345 24690 Some random: 1561582912259.685
1 2 3 Some random: 1561582912261.276
2 3 5 Some random: 1561582912264.386
1 2 3 Some random: 1561582912267.753
1 2 3 Some random: 1561582912270.037
1 2 3 Some random: 1561582912273.079
4 6 10 Some random: 1561582912275.605
88 99 187 Some random: 1561582912269.501
4 2 6 Some random: 1561582912285.449
3 56 59 Some random: 1561582912233.720
10 10 20 Some random: 1561582912289.086
5 6 11 Some random: 1561582912291.958
1 2 3 Some random: 1561582912294.227
1 1 2 Some random: 1561582912298.257



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