Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Confiforms - How to create dependent smart dropdowns where all fields have values in another form?

Jonathan Knollmeyer
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 24, 2018

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>

1 answer

0 votes
Alex Medved _ConfiForms_
Community Champion
June 28, 2018

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, atlassian community, job interviews, interview tips, career advice, interview preparation, job search, interview experiences, hiring process, atlassian careers, community discussion, interview best practices

Interview Tips & Pet Peeves ✍️

Join the discussion on interview best practices and common pitfalls. Share your experiences and learn from others in the Atlassian Community.

Share you experiences!
AUG Leaders

Atlassian Community Events