ConfiForms - Setting value from another form

Shakir Islam April 17, 2019

Form 1 consists of the following:

<ac:structured-macro ac:macro-id="0c4278e0-a417-413e-aa54-044d672476d7" ac:name="confiform" ac:schema-version="1">
<ac:parameter ac:name="formName">SimpleForm</ac:parameter>
<ac:rich-text-body>
<p>
<ac:structured-macro ac:macro-id="ac4d7139-2a14-46d2-ad11-3e392f12a26f" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">select</ac:parameter>
<ac:parameter ac:name="fieldLabel">select</ac:parameter>
<ac:parameter ac:name="values">false[1=Value 1 (1 Link)|2=Value 2 (2 Links)|3=Value 3 (3 Links)|]</ac:parameter>
<ac:parameter ac:name="type">select</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="8d3935f6-57e5-48ec-ae6e-89836134c9ff" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">counter</ac:parameter>
<ac:parameter ac:name="fieldLabel">counter</ac:parameter>
<ac:parameter ac:name="type">text</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="03022698-5bda-4a42-8948-729127a1e012" ac:name="confiform-field-definition-rules" ac:schema-version="1">
<ac:parameter ac:name="fieldName">counter=[entry.count]</ac:parameter>
<ac:parameter ac:name="values">ProductTable:[entry.select.label]</ac:parameter>
<ac:parameter ac:name="action">Lookup and set value</ac:parameter>
<ac:parameter ac:name="onUserActionOnly">true</ac:parameter>
<ac:parameter ac:name="actionFieldName">select</ac:parameter>
<ac:parameter ac:name="values2">linkTable.240762728</ac:parameter>
</ac:structured-macro>
</p>
<p>Placeholder Link Fields</p>
<p>
<ac:structured-macro ac:macro-id="66cd693c-0c04-4fdb-96e2-97e77200dfef" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">link1</ac:parameter>
<ac:parameter ac:name="fieldLabel">link 1</ac:parameter>
<ac:parameter ac:name="type">link</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="a971480b-9c62-4da2-af48-8d6790f1ff7c" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">link2</ac:parameter>
<ac:parameter ac:name="fieldLabel">link 2</ac:parameter>
<ac:parameter ac:name="type">link</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="09f1fda0-6524-404a-b955-efc4023808bd" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">link3</ac:parameter>
<ac:parameter ac:name="fieldLabel">link 3</ac:parameter>
<ac:parameter ac:name="type">link</ac:parameter>
</ac:structured-macro>
</p>
<ac:structured-macro ac:macro-id="d316b819-bfbf-444c-bcf1-09b32973c098" ac:name="confiform-entry-register" ac:schema-version="1">
<ac:parameter ac:name="embedded">true</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>
</ac:rich-text-body>
</ac:structured-macro>
<ac:structured-macro ac:macro-id="744440a3-f140-470b-a3c1-a6e00e0eae97" ac:name="confiform-table" ac:schema-version="1">
<ac:parameter ac:name="messageToShowWhenEmpty">Table is Empty</ac:parameter>
<ac:parameter ac:name="formName">SimpleForm</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>

 Form Two Consists of the following:

<ac:structured-macro ac:macro-id="e6fbc6fd-127c-4b0a-9097-7931a6f0037d" ac:name="confiform" ac:schema-version="1">
<ac:parameter ac:name="formName">linkTable</ac:parameter>
<ac:rich-text-body>
<p>
<ac:structured-macro ac:macro-id="4060f307-4727-4796-ae21-f54ea7fd7d2a" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">productTable</ac:parameter>
<ac:parameter ac:name="fieldLabel">ProductTable</ac:parameter>
<ac:parameter ac:name="type">text</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="ebd1e2b8-6354-4446-bbc5-c88b1165b1c8" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">link1</ac:parameter>
<ac:parameter ac:name="fieldLabel">link1</ac:parameter>
<ac:parameter ac:name="type">text</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="ecf16fb9-490a-404b-9669-c9f017b8d7c1" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">link2</ac:parameter>
<ac:parameter ac:name="fieldLabel">link2</ac:parameter>
<ac:parameter ac:name="type">text</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="0b960143-bc68-41d0-b5e4-668ca77bc0dc" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">link3</ac:parameter>
<ac:parameter ac:name="fieldLabel">link3</ac:parameter>
<ac:parameter ac:name="type">text</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="2e81ebda-aecc-4500-9cf3-6613d6d2e14d" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">count</ac:parameter>
<ac:parameter ac:name="fieldLabel">Count</ac:parameter>
<ac:parameter ac:name="type">text</ac:parameter>
</ac:structured-macro>
</p>
<ac:structured-macro ac:macro-id="30e39c76-5259-475c-94ba-132b81adc89d" ac:name="confiform-entry-register" ac:schema-version="1">
<ac:parameter ac:name="embedded">true</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>
</ac:rich-text-body>
</ac:structured-macro>
<ac:structured-macro ac:macro-id="28d2196c-1de8-4968-8554-94d60afb3a18" ac:name="confiform-table" ac:schema-version="1">
<ac:parameter ac:name="formName">linkTable</ac:parameter>
<ac:parameter ac:name="enableInlineAdd">true</ac:parameter>
<ac:parameter ac:name="export">true</ac:parameter>
<ac:parameter ac:name="enableGridEdit">true</ac:parameter>
<ac:parameter ac:name="enableSearch">true</ac:parameter>
<ac:rich-text-body>
<ac:structured-macro ac:macro-id="a36417d2-1b34-4865-9875-9c164749451c" ac:name="confiform-entry-edit" ac:schema-version="1">
<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>
</ac:rich-text-body>
</ac:structured-macro>
<p>
<br/>
</p>
<p>
<br/>
</p>

 The values entered for form 2 are as follows:

values.JPG

Aim: To have the counter field in form 1 get the value of count field of form 2 based on filtering by productTable Column. Im not too sure what I'm doing incorrect. 

1 answer

0 votes
Alex Medved _ConfiForms_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 10, 2019

You need to "link" the forms with smart field of some sort, for example a smart dropdown (one form has it and references another).

In this case you will have the possibility to reference the data from other form (referenced though the smart field)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events