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


This is a simple demo to demonstrate how to setup the rules to make a choice for the user. We set the 3rd field based on the selections in 2 other fields and the choice is made based on the rating the "country" has

Name

Rating

ID value for rating

Algeria AAA+ 1
Australia AAA+ 1
America AAB+ 2
Ukraine CCC 3
ergergerger AAA+ 1
a AAA+ 1
a AAA+ 1
a AAA+ 1
123 AAB+ 2
Dustin AAA+ 1


C3 field is set to be a country name of the country which rating is bigger than the other

rating is taken from ID value of the ratings dropdown


Storage format

<ac:structured-macro ac:macro-id="4755022e-9fab-4b9d-b9ff-fa15ccac164b" ac:name="confiform" ac:schema-version="1">
  <ac:parameter ac:name="formName">countryRatings1</ac:parameter>
  <ac:rich-text-body>
    <ac:structured-macro ac:macro-id="49a27aa4-274c-4cf5-a134-f289029b2464" 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="f9ec3005-ae26-4662-9ab6-37446db29033" ac:name="confiform-field-definition" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">name</ac:parameter>
        <ac:parameter ac:name="fieldLabel">Name</ac:parameter>
        <ac:parameter ac:name="type">text</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>
      <ac:structured-macro ac:macro-id="37f4aee3-5890-4597-86dd-913d9798ef5f" ac:name="confiform-field-definition" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">rating</ac:parameter>
        <ac:parameter ac:name="fieldLabel">Rating</ac:parameter>
        <ac:parameter ac:name="values">false[1=AAA+|2=AAB+|3=CCC|]</ac:parameter>
        <ac:parameter ac:name="type">select</ac:parameter>
      </ac:structured-macro>
    </p>
  </ac:rich-text-body>
</ac:structured-macro>
<ac:structured-macro ac:macro-id="538b4b36-72fb-4c1f-b876-527773ea9623" ac:name="confiform-table" ac:schema-version="1">
  <ac:parameter ac:name="formName">countryRatings1</ac:parameter>
  <ac:rich-text-body>
    <p>
      <ac:structured-macro ac:macro-id="1699de68-f3f3-4ba3-b9c0-e6db9b4272b0" ac:name="confiform-field" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">name</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>
      <ac:structured-macro ac:macro-id="a4240b65-b31b-45ea-b1a4-8cf29b20931c" ac:name="confiform-field" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">rating</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>
      <ac:structured-macro ac:macro-id="a5e5032d-5cc2-438d-96c9-e58ff4811afe" ac:name="confiform-field" ac:schema-version="1">
        <ac:parameter ac:name="overrideLabel">ID value for rating</ac:parameter>
        <ac:parameter ac:name="fieldName">rating.id</ac:parameter>
      </ac:structured-macro>
    </p>
  </ac:rich-text-body>
</ac:structured-macro>
<p> </p>
<p>C3 field is set to be a country name of the country which rating is bigger than the other</p>
<p>rating is taken from ID value of the ratings dropdown</p>
<p> </p>
<ac:structured-macro ac:macro-id="9d668c91-d2a8-4ad5-9659-6dc89a75ae79" ac:name="confiform" ac:schema-version="1">
  <ac:parameter ac:name="formName">usingCR1</ac:parameter>
  <ac:rich-text-body>
    <ac:structured-macro ac:macro-id="ddd2d3f4-31fd-4322-bf41-8b78403525dd" ac:name="confiform-entry-register" ac:schema-version="1">
      <ac:parameter ac:name="embedded">true</ac:parameter>
      <ac:rich-text-body>
        <p> </p>
      </ac:rich-text-body>
    </ac:structured-macro>
    <p>
      <ac:structured-macro ac:macro-id="5547cc86-98c0-4db5-aaee-ca803d7cad1b" ac:name="confiform-field-definition" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">c1</ac:parameter>
        <ac:parameter ac:name="fieldLabel">Country1</ac:parameter>
        <ac:parameter ac:name="values">[11862801|countryRatings1|name|true||]</ac:parameter>
        <ac:parameter ac:name="type">smartselect</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>
      <ac:structured-macro ac:macro-id="39531cf4-268f-41e5-b443-8726c74acc9d" ac:name="confiform-field-definition" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">c2</ac:parameter>
        <ac:parameter ac:name="fieldLabel">Country2</ac:parameter>
        <ac:parameter ac:name="values">[11862801|countryRatings1|name|true||]</ac:parameter>
        <ac:parameter ac:name="type">smartselect</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>
      <ac:structured-macro ac:macro-id="2848fb5e-176d-468b-a50d-38b77b67188e" ac:name="confiform-field-definition" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">c3</ac:parameter>
        <ac:parameter ac:name="fieldLabel">c3</ac:parameter>
        <ac:parameter ac:name="type">read_only</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>--- reset</p>
    <p>
      <ac:structured-macro ac:macro-id="bfaf873e-94c2-4106-ad98-2b0ddd9ae143" ac:name="confiform-field-definition-rules" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">c3</ac:parameter>
        <ac:parameter ac:name="action">Reset value</ac:parameter>
        <ac:parameter ac:name="onUserActionOnly">true</ac:parameter>
        <ac:parameter ac:name="actionFieldName">c1</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>
      <ac:structured-macro ac:macro-id="e5bd5574-bfc6-482e-a619-5824e1b75a58" ac:name="confiform-field-definition-rules" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">c3</ac:parameter>
        <ac:parameter ac:name="action">Reset value</ac:parameter>
        <ac:parameter ac:name="onUserActionOnly">true</ac:parameter>
        <ac:parameter ac:name="actionFieldName">c2</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>--- set</p>
    <p>
      <ac:structured-macro ac:macro-id="de0bbb4a-bf44-4597-9468-651356b12219" ac:name="confiform-field-definition-rules" ac:schema-version="1">
        <ac:parameter ac:name="condition">!c1:[empty] AND !c2:[empty] AND c1.rating:&gt;=[entry.c2.rating]</ac:parameter>
        <ac:parameter ac:name="values">c3=[entry.c1.name]</ac:parameter>
        <ac:parameter ac:name="action">Set value</ac:parameter>
        <ac:parameter ac:name="actionFieldName">c1</ac:parameter>
      </ac:structured-macro>
      <ac:structured-macro ac:macro-id="6d4ac8e0-61ef-4bb7-824b-73044da24689" ac:name="confiform-field-definition-rules" ac:schema-version="1">
        <ac:parameter ac:name="condition">!c1:[empty] AND !c2:[empty] AND c1.rating:&lt;[entry.c2.rating]</ac:parameter>
        <ac:parameter ac:name="values">c3=[entry.c2.name]</ac:parameter>
        <ac:parameter ac:name="action">Set value</ac:parameter>
        <ac:parameter ac:name="actionFieldName">c1</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>
      <ac:structured-macro ac:macro-id="eef7af2c-e1dc-46c0-8bb6-d3026e30f235" ac:name="confiform-field-definition-rules" ac:schema-version="1">
        <ac:parameter ac:name="condition">!c1:[empty] AND !c2:[empty] AND c2.rating:&gt;=[entry.c1.rating]</ac:parameter>
        <ac:parameter ac:name="values">c3=[entry.c2.name]</ac:parameter>
        <ac:parameter ac:name="action">Set value</ac:parameter>
        <ac:parameter ac:name="actionFieldName">c2</ac:parameter>
      </ac:structured-macro>
      <ac:structured-macro ac:macro-id="0053d0ba-76d2-4e86-b875-323de55295a9" ac:name="confiform-field-definition-rules" ac:schema-version="1">
        <ac:parameter ac:name="condition">!c1:[empty] AND !c2:[empty] AND c2.rating:&lt;[entry.c1.rating]</ac:parameter>
        <ac:parameter ac:name="values">c3=[entry.c1.name]</ac:parameter>
        <ac:parameter ac:name="action">Set value</ac:parameter>
        <ac:parameter ac:name="actionFieldName">c2</ac:parameter>
      </ac:structured-macro>
    </p>
    <p> </p>
  </ac:rich-text-body>
</ac:structured-macro>
<p> </p>
<p> </p>
<p> </p>

The page ID needs to be changed after yo import the storage format (this will re-setup the smart dropdown fields configurations)



  • No labels