Page tree

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

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.

In this example we will demo a simple setup of 2 forms, which emulate the stock / warehouse


Stock form

item

Quantity

preassure suit 2
helmet 4
boots, size 9 0
swimsuit 0
bag 12
coffee 10
test 2
house 100
jsdkANSDKJ 3
444 111
suit 4
444 2
helmet 10
tank 3
home_a_safe_place_never_to_be_yelled_at 1
444 10
bingo 21
TEST Item 20
teszter 4
test-item 5
hallo 2
test 7
hoi 4
testing entry 123 80




Salespoint / ordering form, which reduces stock

Items with 0 quantity are not shown in the ordering list

ordered item

order time

coffee Feb 01, 2022 12:31
test Feb 01, 2022 14:02
test Feb 01, 2022 14:02
preassure suit Feb 01, 2022 14:02
coffee Feb 01, 2022 14:02
helmet Feb 11, 2022 05:00
coffee Feb 11, 2022 05:00
preassure suit Feb 11, 2022 05:01
preassure suit Feb 15, 2022 09:25
preassure suit Feb 15, 2022 09:25
suit May 02, 2022 21:43
444 May 25, 2022 17:48
444 May 25, 2022 17:48
444 May 25, 2022 17:48
444 May 25, 2022 17:48
444 May 25, 2022 17:48
444 May 25, 2022 17:49
444 May 25, 2022 17:49
bag Jun 08, 2022 18:07
helmet Jun 20, 2022 13:01
coffee Jul 07, 2022 15:48
coffee Jul 10, 2022 15:37
tank Jul 21, 2022 04:10
home_a_safe_place_never_to_be_yelled_at Sep 09, 2022 07:22
Oct 06, 2022 15:55
444 Oct 27, 2022 16:00
suit Oct 31, 2022 12:03
bingo Oct 31, 2022 12:04
bingo Oct 31, 2022 12:04
helmet Nov 11, 2022 10:10
preassure suit Dec 01, 2022 01:17
helmet Dec 22, 2022 01:04
bag Dec 22, 2022 01:07
bag Jan 02, 2023 14:14
preassure suit Jan 17, 2023 00:02
TEST Item Feb 02, 2023 16:00
test Feb 02, 2023 16:13
helmet Feb 08, 2023 06:11
helmet Feb 08, 2023 10:02
preassure suit Mar 15, 2023 11:49
coffee May 17, 2023 11:06
test-item May 17, 2023 11:21
test-item May 19, 2023 07:40
coffee May 25, 2023 23:00
bag May 29, 2023 23:28
hallo May 30, 2023 13:57
preassure suit Jun 05, 2023 05:35
preassure suit Jun 05, 2023 05:35
helmet Jun 13, 2023 15:10
helmet Jun 27, 2023 21:24
helmet Jul 17, 2023 02:06
test Aug 29, 2023 18:20
coffee Sep 12, 2023 14:16
coffee Sep 12, 2023 14:16
coffee Jan 18, 2024 11:55
bag Feb 02, 2024 13:16
helmet Mar 26, 2024 17:25


Solution for this demo in storage format (please remember to change the config for "orderItem" field in the form#2 (orderForm1) to reference the stock form on your page)

<p>In this example we will demo a simple setup of 2 forms, which emulate the stock / warehouse</p>
<p>
  <br/>
</p>
<p>Stock form</p>
<ac:structured-macro ac:macro-id="ea7db6d6-4aaa-44d4-82bb-94c487bd5913" ac:name="confiform" ac:schema-version="1">
  <ac:parameter ac:name="formName">stock1</ac:parameter>
  <ac:parameter ac:name="registrationFormTitle">Stock</ac:parameter>
  <ac:rich-text-body>
    <ac:structured-macro ac:macro-id="abf41b82-7f09-423e-bea5-2fb2bf62abbc" ac:name="confiform-entry-register" ac:schema-version="1">
      <ac:parameter ac:name="registrationButtonLabel">Register stock item</ac:parameter>
      <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
      <ac:rich-text-body>
        <p>
          <br/>
        </p>
      </ac:rich-text-body>
    </ac:structured-macro>
    <p>
      <ac:structured-macro ac:macro-id="16735a0c-2732-4cf8-825e-414eb2dc591d" ac:name="confiform-field-definition" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">item</ac:parameter>
        <ac:parameter ac:name="fieldLabel">item</ac:parameter>
        <ac:parameter ac:name="type">text</ac:parameter>
        <ac:parameter ac:name="required">true</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>
      <ac:structured-macro ac:macro-id="22a54919-25fd-42aa-8670-6dfbeca28705" ac:name="confiform-field-definition" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">quantity</ac:parameter>
        <ac:parameter ac:name="fieldLabel">Quantity</ac:parameter>
        <ac:parameter ac:name="type">number</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>
      <ac:structured-macro ac:macro-id="db9f48aa-06d3-4fe7-8358-c487f2415be8" ac:name="confiform-field-definition-rules" ac:schema-version="1">
        <ac:parameter ac:name="condition">id:[empty] AND quantity:&lt;0</ac:parameter>
        <ac:parameter ac:name="fieldName">Quantity shall be non negative</ac:parameter>
        <ac:parameter ac:name="action">Validation rule</ac:parameter>
      </ac:structured-macro>
    </p>
  </ac:rich-text-body>
</ac:structured-macro>
<ac:structured-macro ac:macro-id="7013aab1-1ea4-4594-a88e-481ed3b46a3d" ac:name="confiform-table" ac:schema-version="1">
  <ac:parameter ac:name="formName">stock</ac:parameter>
  <ac:rich-text-body>
    <p>
      <br/>
    </p>
  </ac:rich-text-body>
</ac:structured-macro>
<p>
  <br/>
</p>
<p>
  <br/>
</p>
<p>
  <br/>
</p>
<p>Salespoint / ordering form, which reduces stock</p>
<p>Items with 0 quantity are not shown in the ordering list</p>
<ac:structured-macro ac:macro-id="5d01f7a6-37c4-4d10-8f2b-f74b9255b4b3" ac:name="confiform" ac:schema-version="1">
  <ac:parameter ac:name="formName">orderForm1</ac:parameter>
  <ac:rich-text-body>
    <ac:structured-macro ac:macro-id="4a184218-8a09-4085-8e20-6d4177af9c8e" ac:name="confiform-entry-register" ac:schema-version="1">
      <ac:parameter ac:name="registrationButtonLabel">Order</ac:parameter>
      <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
      <ac:rich-text-body>
        <p>
          <br/>
        </p>
      </ac:rich-text-body>
    </ac:structured-macro>
    <p>
      <ac:structured-macro ac:macro-id="3650d422-e6df-45df-9e61-ea7c82ff7443" ac:name="confiform-field-definition" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">orderItem</ac:parameter>
        <ac:parameter ac:name="fieldLabel">Item to order</ac:parameter>
        <ac:parameter ac:name="values">[29393083|stock1|item|true||]</ac:parameter>
        <ac:parameter ac:name="type">smartselect2</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>
      <ac:structured-macro ac:macro-id="86231268-91d6-46a8-b8fa-3b38fbdbd322" ac:name="confiform-field-definition-rules" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">orderItem</ac:parameter>
        <ac:parameter ac:name="values">quantity:&gt;0</ac:parameter>
        <ac:parameter ac:name="action">Apply Filter on a field</ac:parameter>
      </ac:structured-macro> – show only items with quantity &gt; 0</p>
    <p>
      <ac:structured-macro ac:macro-id="f004b282-3bbc-4c67-9e86-6faea01e4ac2" ac:name="confiform-field-definition-rules" ac:schema-version="1">
        <ac:parameter ac:name="condition">id:[empty] AND orderItem.quantity:&lt;1</ac:parameter>
        <ac:parameter ac:name="fieldName">Sorry, we dont have this item in stock anymore</ac:parameter>
        <ac:parameter ac:name="action">Validation rule</ac:parameter>
      </ac:structured-macro>
    </p>
    <ac:structured-macro ac:macro-id="5a3e3e8f-34fa-4f59-92c9-4aa320d0f1ba" ac:name="confiform-ifttt" ac:schema-version="1">
      <ac:parameter ac:name="action">Create ConfiForms Entry</ac:parameter>
      <ac:parameter ac:name="event">onCreated</ac:parameter>
      <ac:parameter ac:name="title">entryId=[entry.orderItem]&amp;quantity=([entry.orderItem.quantity]-1)</ac:parameter>
      <ac:parameter ac:name="who">stock:this</ac:parameter>
      <ac:rich-text-body>
        <p>
          <br/>
        </p>
      </ac:rich-text-body>
    </ac:structured-macro>
  </ac:rich-text-body>
</ac:structured-macro>
<ac:structured-macro ac:macro-id="6490db44-bf19-408f-bd61-d3334884a7b9" ac:name="confiform-table" ac:schema-version="1">
  <ac:parameter ac:name="formName">orderForm</ac:parameter>
  <ac:rich-text-body>
    <p>
      <ac:structured-macro ac:macro-id="25d125bd-27fd-4bb5-b9f9-412e3b11dcd0" ac:name="confiform-field" ac:schema-version="1">
        <ac:parameter ac:name="overrideLabel">ordered item</ac:parameter>
        <ac:parameter ac:name="fieldName">orderItem</ac:parameter>
      </ac:structured-macro> <ac:structured-macro ac:macro-id="f4dcb615-2dbf-47ed-97f0-9af7b27ec775" ac:name="confiform-field" ac:schema-version="1">
        <ac:parameter ac:name="overrideLabel">order time</ac:parameter>
        <ac:parameter ac:name="fieldName">created</ac:parameter>
      </ac:structured-macro>
    </p>
  </ac:rich-text-body>
</ac:structured-macro>