It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How do you make dynamic dorpdowns from another form, where the dropdown values are uniquely listed?

Jonathan Knollmeyer May 25, 2018

I want to have multiple dropdowns on my form where the values from these dropdowns are coming from a second form.

As each field is selected, the next dropdown field should be filtered with the selected value.

I can get this to work, but all the dropdowns have repeated values. I want the dropdowns to contain a unique list of values, even if they belong to multiple rows on the source form.

If I change the field definition property: "Reference to field values" to false, I can get a unique list of values, but it breaks the filtering.

How can I accomplish this?


Here is my source code:

<ac:structured-macro ac:name="confiform">
<ac:parameter ac:name="formName">dd</ac:parameter>
<ac:structured-macro ac:name="confiform-entry-register">
<ac:parameter ac:name="formName">dd</ac:parameter>
<ac:parameter ac:name="embedded">true</ac:parameter>
<ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
<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|true||domain.label]</ac:parameter>
<ac:parameter ac:name="type">smartselect2</ac:parameter>
<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|true||program.label]</ac:parameter>
<ac:parameter ac:name="type">smartselect2</ac:parameter>
<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>


2 answers

1 vote
Alex Medved Jun 28, 2018

I believe that having a "Smart classifier" field in your "dd" form, pointed at "esf" form with fields "domain" and "program" will be a much better option

As the field type provides exactly what you are looking for, a way to have "dependent" dropdowns which are based on the data from single form

Jon K Oct 05, 2018

Thank you, this seems like it should work. I also found this page which demonstrates the behavior, but does not show the source:


However, I am encountering a bug when trying to use the Smart Classifier field.

Inside the "Edit ‘ConfiForms Form Field (Definition)’ Macro", I can not get the part for "Page where the ConfiForms Form is defined" to recognize any of my pages with forms.

I try to edit the source and the field does not show up at all after saving:

<ac:structured-macro ac:macro-id="377863af-ac97-4ca0-bb9d-4dbcb5eaf670" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">sm</ac:parameter>
<ac:parameter ac:name="fieldLabel">Smart Classifier</ac:parameter>
<ac:parameter ac:name="values">[322992200:esfform:product]</ac:parameter>
<ac:parameter ac:name="type">smartclass</ac:parameter>


Any advice on why the Smart Classifier option will not recognize my pages where I have forms defined? It does find some pages where I do not have any forms.

Alex Medved Oct 05, 2018

Most probably you need to rebuilt the search index, as these page lookups use the search index, and if you cannot see the page in the lookup results then it is, most obviously, means your index is obsolete

Jon K Oct 05, 2018

I was able to update the source like this and get it to work; but the "Page where the ConfiForms Form is defined" dropdown still does not recognize my page when trying to use the macro form.

Using this format in the source worked:
<ac:structured-macro ac:macro-id="53d87136-10de-401f-a784-c151d0f70a97" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">product</ac:parameter>
<ac:parameter ac:name="fieldLabel">Application</ac:parameter>
<ac:parameter ac:name="values">[322992200:esfform]product,service,channel,function,maxpriority,externalname,mim,</ac:parameter>
<ac:parameter ac:name="type">smartclass</ac:parameter>
<ac:parameter ac:name="required">true</ac:parameter>

0 votes
Jon K Oct 07, 2018

Is there anyway to have one of the dependent fields as a multiselect by using Smart Classifier?

Alex Medved Oct 07, 2018

Field of "Smart Classifier" type is designed to allow users to pick just one option from the dynamically filtered set of options


You can setup a smart multi-select field and have a field definition rule with action to "apply filter" configured to filter out the selections in this multi-select field based on the selections made in some other field

Jon K Oct 08, 2018 • edited

Thank you I was able to get this to work, but my filtered results shows duplicate values.

Is there anyway to only get unique values returned back to the Smart Mulitselect?

And would it be possible to have another multiselect that depends on the values of my previously filtered Smart Multiselect?

Basically, there are many dependent dropdowns which would all be multiselect fields; depending on the values in previous multiselect.

Alex Medved Oct 08, 2018

What are duplicates and what are unique values in the multi-select when we talk about records filtered by the rule - I need to see an example of what you have, as most probably these are ALREADY unique records... but representing the same values

There are no any limits on how many fields per form you can have. And yes, you can do a smart multi-select which depends on the values selected in another smart multi-select. No limit here either... except the complexity it brings and has

Jon K Oct 09, 2018

Thanks for the feedback.
I've drafted a couple test forms to depict this scenario and posted it as a new question:

I hope it makes sense and I hope that I'm overlooking some simple solution :)

Jan Feb 19, 2019

Hello, I am new to Confiforms and looking for exactly this. I will not have trouble with duplicates, as each filter (based on first dropdown) will only have unique values. But I have no clue how to get this done. Is it possible to get above mentioned source code imported? Currently I am trying to get this work with all the different macros but without success. 

Alex Medved Feb 19, 2019

You can import the storage format with Confluence source editor app

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Marketplace Apps & Integrations

scaling agile at the enterprise level with Valiantys

Hey there Community! My name is Vannya Vallejo, the Channel Communication Specialist at Atlassian and I want to help Atlassian users like you learn about our Solution Partners and how they can help ...

433 views 1 12
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you