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.


This is a demo to show how the dropdown could be filtered using the "usedcount" also counting how many time the name was used

There is also a mechanism used to prevent the deletion of the data if it is used in the other form

Meaning that the form that uses the data from a source form sets the counter about how many times the data have been used. And there is a delete rule on source form to check the "used counter" and fail the deletion of the used count is more than 0

Records in f

profileName

Used count

hello 1
hel 0
new 0
new 0
uytuty 1
val 0
val 0
Test 0
Test 0
test 0
GreetYou 0
Timen 0
pb 0
0
hello 0
hello 0
tr 0
Boris 0
sddfs 0
hello 0
Ah 0
ee 0
8634ae94-b446-4260-8b79-6fb13579e701 0
a 0
kek 0
fff 0
AML 0
A1 0
A1 0
yyyyyyyy 0
test 0
test 0
ggg 0
hi 0
hello 0
abcd 0
sdf 0
new 0
peggy 0
pam 0
hadley 0
HS01 0
TSN 0
12345 0
jonzo ball 0
hello 0
test 0
sdv 0
val 0
uyt 0
hello 0
wert 0
0
Xav 0
val 0
Maus123 0
Maus123 0
lauraaaaa 0
RAProfile 0
PINOY 0
PINOY 0
fgfgsd 0
sign 0
Rohit 0

 

Recods in f2

 

profileName

hello
hello
hello
hello
hello
hel
hel
uytuty
hello
uytuty
val
val
val
val
Test
hello
uytuty
test
Test
Test
GreetYou
pb
hello
hello
tr
Boris
hello
Boris
hello
hel
Ah
GreetYou
val
uytuty
hello
kek
test
hello
hello
hello
new
A1
A1
test
hello
new
uytuty
Test
hello
hello
new
hello
val
GreetYou
tr
hello
hadley
val
HS01
12345
jonzo ball
hello
val
val
val
hello
hello
new
uyt
uyt
uyt
uyt
uyt
uyt
uyt
uyt
uyt
uyt
uyt
wert
wert
wert
wert
wert
wert
wert
wert
wert
wert
wert
wert
test
hello
test
12345
kek
hello
Maus123
hello
hello
hel
uytuty
PINOY
hello

Source code for the solution

<ac:structured-macro ac:macro-id="323f6007-384e-41ce-8d66-7d65c436f281" ac:name="confiform" ac:schema-version="1">
  <ac:parameter ac:name="formName">f01</ac:parameter>
  <ac:rich-text-body>
    <ac:structured-macro ac:macro-id="ef798ae4-d4a7-42c4-8c3e-4b93c2f56286" ac:name="confiform-entry-register" ac:schema-version="1">
      <ac:rich-text-body>
        <p> </p>
      </ac:rich-text-body>
    </ac:structured-macro>
    <p>
      <ac:structured-macro ac:macro-id="b9706e4b-d98e-4cdf-8452-07c715edc161" ac:name="confiform-field-definition" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">profileName</ac:parameter>
        <ac:parameter ac:name="fieldLabel">profileName</ac:parameter>
        <ac:parameter ac:name="type">text</ac:parameter>
      </ac:structured-macro>
    </p>
    <p> </p>
    <p>
      <ac:structured-macro ac:macro-id="4d2758d3-4c25-4466-84be-3340a02e5f5d" ac:name="confiform-field-definition" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">used</ac:parameter>
        <ac:parameter ac:name="fieldLabel">Used</ac:parameter>
        <ac:parameter ac:name="values">false</ac:parameter>
        <ac:parameter ac:name="type">hidden</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>
      <ac:structured-macro ac:macro-id="6690c163-f11d-4f0c-b892-2c7b3f14459e" ac:name="confiform-field-definition" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">usedcount</ac:parameter>
        <ac:parameter ac:name="fieldLabel">Used count</ac:parameter>
        <ac:parameter ac:name="values">0</ac:parameter>
        <ac:parameter ac:name="type">hidden</ac:parameter>
      </ac:structured-macro>
    </p>
    <ac:structured-macro ac:macro-id="11c04fe8-aa43-49d0-a460-a0b1cec79e01" ac:name="confiform-ifttt" ac:schema-version="1">
      <ac:parameter ac:name="condition">used:true</ac:parameter>
      <ac:parameter ac:name="extras3">true</ac:parameter>
      <ac:parameter ac:name="action">Create ConfiForms Entry</ac:parameter>
      <ac:parameter ac:name="event">onModified</ac:parameter>
      <ac:parameter ac:name="title">entryId=[entry.id]&amp;usedcount=([entry.usedcount]+1)&amp;used=true</ac:parameter>
      <ac:parameter ac:name="who">f01:12222622</ac:parameter>
      <ac:rich-text-body>
        <p> </p>
      </ac:rich-text-body>
    </ac:structured-macro>
    <ac:structured-macro ac:macro-id="fef83b62-6842-4374-8d32-3b13abeb38ed" ac:name="confiform-ifttt" ac:schema-version="1">
      <ac:parameter ac:name="condition">used:false</ac:parameter>
      <ac:parameter ac:name="extras3">true</ac:parameter>
      <ac:parameter ac:name="action">Create ConfiForms Entry</ac:parameter>
      <ac:parameter ac:name="event">onModified</ac:parameter>
      <ac:parameter ac:name="title">entryId=[entry.id]&amp;usedcount=([entry.usedcount]-1)&amp;used=false</ac:parameter>
      <ac:parameter ac:name="who">f01:12222622</ac:parameter>
      <ac:rich-text-body>
        <p> </p>
      </ac:rich-text-body>
    </ac:structured-macro>
    <p>
      <ac:structured-macro ac:macro-id="965ed455-9a0a-461f-93ab-49fad96f376b" ac:name="confiform-field-definition-rules" ac:schema-version="1">
        <ac:parameter ac:name="condition">usedcount:&gt;0</ac:parameter>
        <ac:parameter ac:name="fieldName">You cannot edit this record (it is used (referenced) in other form)</ac:parameter>
        <ac:parameter ac:name="action">Validate on delete</ac:parameter>
      </ac:structured-macro>
    </p>
  </ac:rich-text-body>
</ac:structured-macro>
<ac:structured-macro ac:macro-id="3aebe087-a1d1-4b14-9367-7c87a4efd011" ac:name="confiform" ac:schema-version="1">
  <ac:parameter ac:name="formName">f11</ac:parameter>
  <ac:rich-text-body>
    <ac:structured-macro ac:macro-id="28803937-25f6-4738-92e5-ea53d8edae7f" ac:name="confiform-entry-register" ac:schema-version="1">
      <ac:rich-text-body>
        <p> </p>
      </ac:rich-text-body>
    </ac:structured-macro>
    <p>
      <ac:structured-macro ac:macro-id="578f2f88-9e05-4491-9a34-40c139c23152" ac:name="confiform-field-definition" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">profileName</ac:parameter>
        <ac:parameter ac:name="fieldLabel">profileName</ac:parameter>
        <ac:parameter ac:name="values">[12222622|f|profileName|true||]</ac:parameter>
        <ac:parameter ac:name="type">smartselect</ac:parameter>
      </ac:structured-macro>
    </p>
    <ac:structured-macro ac:macro-id="ea265827-080b-4f1f-b859-7728658da04f" ac:name="confiform-ifttt" ac:schema-version="1">
      <ac:parameter ac:name="extras5">true</ac:parameter>
      <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.profileName]&amp;used=true</ac:parameter>
      <ac:parameter ac:name="who">f:12222622</ac:parameter>
      <ac:rich-text-body>
        <p> </p>
      </ac:rich-text-body>
    </ac:structured-macro>
    <ac:structured-macro ac:macro-id="a9b4c52e-dc2c-412c-a353-0609b30ae72f" ac:name="confiform-ifttt" ac:schema-version="1">
      <ac:parameter ac:name="extras5">true</ac:parameter>
      <ac:parameter ac:name="condition">hasChanged(profileName):true</ac:parameter>
      <ac:parameter ac:name="action">Create ConfiForms Entry</ac:parameter>
      <ac:parameter ac:name="event">onModified</ac:parameter>
      <ac:parameter ac:name="title">entryId=[entry._previousState.profileName]&amp;used=false</ac:parameter>
      <ac:parameter ac:name="who">f01:12222622</ac:parameter>
      <ac:rich-text-body>
        <p> </p>
      </ac:rich-text-body>
    </ac:structured-macro>
    <ac:structured-macro ac:macro-id="ecd1c878-ddfb-4ce4-9f06-796a3334935b" ac:name="confiform-ifttt" ac:schema-version="1">
      <ac:parameter ac:name="extras5">true</ac:parameter>
      <ac:parameter ac:name="condition">hasChanged(profileName):true</ac:parameter>
      <ac:parameter ac:name="action">Create ConfiForms Entry</ac:parameter>
      <ac:parameter ac:name="event">onModified</ac:parameter>
      <ac:parameter ac:name="title">entryId=[entry.profileName]&amp;used=true</ac:parameter>
      <ac:parameter ac:name="who">f01:12222622</ac:parameter>
      <ac:rich-text-body>
        <p> </p>
      </ac:rich-text-body>
    </ac:structured-macro>
    <ac:structured-macro ac:macro-id="01a76f72-1c9f-44d5-be3b-38038a419dc0" ac:name="confiform-ifttt" ac:schema-version="1">
      <ac:parameter ac:name="extras5">true</ac:parameter>
      <ac:parameter ac:name="action">Create ConfiForms Entry</ac:parameter>
      <ac:parameter ac:name="event">onDeleted</ac:parameter>
      <ac:parameter ac:name="title">entryId=[entry.profileName]&amp;used=false</ac:parameter>
      <ac:parameter ac:name="who">f01:12222622</ac:parameter>
      <ac:rich-text-body>
        <p> </p>
      </ac:rich-text-body>
    </ac:structured-macro>
  </ac:rich-text-body>
</ac:structured-macro>
<p>Records in f</p>
<ac:structured-macro ac:macro-id="a08b6b66-1070-48a8-b56b-1416630b937a" ac:name="confiform-table" ac:schema-version="1">
  <ac:parameter ac:name="formName">f01</ac:parameter>
  <ac:rich-text-body>
    <p>
      <ac:structured-macro ac:macro-id="542e9d47-c466-4ae8-948d-45b961c32214" ac:name="confiform-field" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">profileName</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>
      <ac:structured-macro ac:macro-id="fd0b30d1-4185-4a29-b5e3-83d6cb47aeaf" ac:name="confiform-field" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">usedcount</ac:parameter>
      </ac:structured-macro>
    </p>
  </ac:rich-text-body>
</ac:structured-macro>
<p> </p>
<p>Recods in f2</p>
<p> </p>
<ac:structured-macro ac:macro-id="b9cb1824-20f7-49f2-afd2-dfa95775899b" ac:name="confiform-table" ac:schema-version="1">
  <ac:parameter ac:name="formName">f11</ac:parameter>
  <ac:rich-text-body>
    <p>
      <ac:structured-macro ac:macro-id="b5bc0a57-2d00-4e21-973b-b98a3f369ca0" ac:name="confiform-field" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">profileName</ac:parameter>
      </ac:structured-macro>
    </p>
    <p> </p>
  </ac:rich-text-body>
</ac:structured-macro>

  • No labels