I have a table populated with a Confiform which has Domains and Programs (one to many).
On a new form, I want to select a Domain from a dropdown populated from this table.
Based on the Domain value selected, I want a second dropdown to contain the respective Programs for said domain.
The values should update dynamically, based on the Domain selection.
I can get this to work, however, the values in each dropdown are not distinct. The values get repeated, having the same number of rows in the table. (The same Domain/Program value will show 10 times, if there are 10 rows for that Domain/Program).
Here is my source code:
<ac:structured-macro ac:name="confiform">
<ac:parameter ac:name="formName">usingchoices</ac:parameter>
<ac:rich-text-body>
<p>
<ac:structured-macro ac:name="confiform-entry-register">
<ac:parameter ac:name="embedded">true</ac:parameter>
<ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
<ac:rich-text-body>
<p> </p>
</ac:rich-text-body>
</ac:structured-macro> </p>
<p>
<ac:structured-macro ac:name="confiform-field-definition">
<ac:parameter ac:name="fieldName">mychoice1</ac:parameter>
<ac:parameter ac:name="fieldLabel">My choice 1</ac:parameter>
<ac:parameter ac:name="values">[277274429|esf|domain.name|true||]</ac:parameter>
<ac:parameter ac:name="type">smartselect2</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:name="confiform-field-definition">
<ac:parameter ac:name="fieldName">mychoice2</ac:parameter>
<ac:parameter ac:name="fieldLabel">My choice 2</ac:parameter>
<ac:parameter ac:name="values">[277274429|esf|program.name|true||]</ac:parameter>
<ac:parameter ac:name="type">smartselect2</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:name="confiform-field-definition-rules">
<ac:parameter ac:name="fieldName">mychoice2</ac:parameter>
<ac:parameter ac:name="values">domain:[entry.mychoice1.domain]</ac:parameter>
<ac:parameter ac:name="action">Apply Filter on a field</ac:parameter>
<ac:parameter ac:name="actionFieldName">mychoice1</ac:parameter>
</ac:structured-macro>
</p>
</ac:rich-text-body>
</ac:structured-macro>
This is duplicate of https://community.atlassian.com/t5/Marketplace-Apps-questions/How-do-you-make-dynamic-dorpdowns-from-another-form-where-the/qaq-p/805571#U832994
Please see the advise on the mentioned question
Join the discussion on interview best practices and common pitfalls. Share your experiences and learn from others in the Atlassian Community.
Share you experiences!Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.