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

ConfiForms - How to eliminate duplicate values from a Smart Multiselect?

I have 2 forms named "lookup" and "myform"

On the "lookup" form I have 3 fields in my table: Application, Component, Function.

lookup_form.PNG

On the "myform" form, I have a Smart Dropdown for selecting the Application.
The Smart Dropdown shows every row for the "lookup.Application" field and I want to display unique values from that field only.

 myform_appdropdwon.PNG

 

Additionally, the "My Component" field is a Smart Multiselect. This field is to contain the values from the "lookup.Component" form. It is to also have a filter where "My App" equals the "lookup.Application" so it only shows the distinct values of "lookup.Component" for the respective choice in "My App". I am unable to get this to work and I would also like for this to return a distinct list of Component values for the respective "My App".

Below are my sources for the two forms. Any advice on what I'm doing wrong is much appreciated.

 

"lookup" form:


<ac:structured-macro ac:macro-id="8ae3d29e-e4d4-4ff3-8389-2b11629c983b" ac:name="confiform" ac:schema-version="1">
<ac:parameter ac:name="formName">lookup</ac:parameter>
<ac:parameter ac:name="registrationFormTitle">Lookup Form</ac:parameter>
<ac:rich-text-body>
<p>
<ac:structured-macro ac:macro-id="e69f91b5-eea7-4fcd-be37-4d7ca691294c" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">Application</ac:parameter>
<ac:parameter ac:name="fieldLabel">Application</ac:parameter>
<ac:parameter ac:name="values">false[1=WebApp|2=InternalApp|3=AnotherApp|]</ac:parameter>
<ac:parameter ac:name="type">select</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="34b80d92-74fc-406c-ad96-985597b34339" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">Component</ac:parameter>
<ac:parameter ac:name="fieldLabel">Component</ac:parameter>
<ac:parameter ac:name="values">false[1=UserInterface|2=API|3=Database|]</ac:parameter>
<ac:parameter ac:name="type">select</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="95431d48-c95a-432e-ab0c-3d580395b90d" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">Function</ac:parameter>
<ac:parameter ac:name="fieldLabel">Function</ac:parameter>
<ac:parameter ac:name="values">false[1=Home Page|2=Registration API|3=Purchase API|4=Batch Processing|5=Dashboard|6=Send Data Files|]</ac:parameter>
<ac:parameter ac:name="type">select</ac:parameter>
</ac:structured-macro>
</p>
<ac:structured-macro ac:macro-id="319c9f9b-9ccc-4f7f-8b07-3a092341c673" ac:name="confiform-entry-register" ac:schema-version="1">
<ac:parameter ac:name="embedded">true</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="a23c2c7d-bec0-4ca0-9011-81244a25a0e3" ac:name="confiform-table" ac:schema-version="1">
<ac:parameter ac:name="formName">lookup</ac:parameter>
<ac:rich-text-body>
<p>
<ac:structured-macro ac:macro-id="775f2e68-78fa-437e-860f-b5deabba91b0" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="fieldName">Application</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="f6e24a6c-e204-47c6-98a1-f087dc8270f8" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="fieldName">Component</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="fd9ef0ca-7a14-4953-b311-57ce550c4e9b" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="fieldName">Function</ac:parameter>
</ac:structured-macro>
</p>
</ac:rich-text-body>
</ac:structured-macro>

 

"myform" form:

<ac:structured-macro ac:macro-id="73d6ff04-3e34-44c5-bbd9-37de62c40ef1" ac:name="confiform" ac:schema-version="1">
<ac:parameter ac:name="formName">myform</ac:parameter>
<ac:parameter ac:name="registrationFormTitle">My Form</ac:parameter>
<ac:rich-text-body>
<p>
<ac:structured-macro ac:macro-id="919e1174-69fb-4ca9-9d6c-f4a0fe726f98" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">myticket</ac:parameter>
<ac:parameter ac:name="fieldLabel">My Ticket</ac:parameter>
<ac:parameter ac:name="type">text</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="81706444-f25b-46d5-b955-fc962e3782a2" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">myapp</ac:parameter>
<ac:parameter ac:name="fieldLabel">My App</ac:parameter>
<ac:parameter ac:name="values">[324123093|lookup|Application|true|false|[entry.Application.label]]</ac:parameter>
<ac:parameter ac:name="type">smartselect</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="4dd59b93-5bc5-42d4-bec8-57cfba2b72fb" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">mycomp</ac:parameter>
<ac:parameter ac:name="fieldLabel">My Componenet</ac:parameter>
<ac:parameter ac:name="values">[324123093|lookup|Component|true|false|[entry.Component.label]]</ac:parameter>
<ac:parameter ac:name="type">smartmultiselect</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="4ab52df1-c8a3-491a-b1fe-881966165d3f" ac:name="confiform-field-definition-rules" ac:schema-version="1">
<ac:parameter ac:name="fieldName">mycomp</ac:parameter>
<ac:parameter ac:name="values">Application:[entry.myapp]</ac:parameter>
<ac:parameter ac:name="action">Apply Filter on a field</ac:parameter>
<ac:parameter ac:name="actionFieldName">myapp</ac:parameter>
</ac:structured-macro>
</p>
<ac:structured-macro ac:macro-id="319c9f9b-9ccc-4f7f-8b07-3a092341c673" ac:name="confiform-entry-register" ac:schema-version="1">
<ac:parameter ac:name="embedded">true</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="4fc709d9-b4b0-48d4-940a-bec2358702fb" ac:name="confiform-table" ac:schema-version="1">
<ac:parameter ac:name="formName">myform</ac:parameter>
<ac:rich-text-body>
<p>
<ac:structured-macro ac:macro-id="8e5c243d-28c4-4a8f-b991-e4fe380cefaa" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="fieldName">myticket</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="6883e784-dbb8-4fbf-b802-d59992985d4b" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="fieldName">myapp</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="16429633-8014-4cee-8768-a1364a348004" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="fieldName">mycomp</ac:parameter>
</ac:structured-macro>
</p>
</ac:rich-text-body>
</ac:structured-macro>

 

 

 

1 answer

These choices are not duplicates at all.

Choices in the "My component" field represent rows from your lookup table.

And they are UNIQUE. The values for a particular field are not, but the choices are unique. 

Smart fields operate on references (UUIDs) to records  in other forms they are connected to. 

Do you know if there if there someway to achieve the behavior described in the main post?

What you asking is to group by labels something what is stored as a unique record.

I just cannot understand what will be selected when you "group" it like that

let's say you have 2 records with different IDs, but holding the same values. Imagine we show this value only once in the options... what record will be selected when you select this option!?

It could be either record in theory, because I just want the value.

Below is an example of how I want my form to look; if I use the data from the "lookup" form in the main post.

 

Dropdown1: (choices)

  • InternalApp
  • WebApp

I chose Internal App

Dropdown2: (multiselect)

  • API
  • UserInterface

I dont necessarily care which record the "API" choice comes from, I just want to see a unique list so I can pass the value onto the next dropdown.

Dropdown3: (multiselect, if I choose both from Dropdown2, I'd want to see. If I only chose "API" in Dropdown2, then we wouldnt get HomePage.)

  • HomePage
  • PurchaseAPI
  • RegistrationAPI

 

Essentially, I only care about getting the values, so they can be passed as filters on the next form entry/dropdown. 

 

Hopefully my use case makes sense. 

So, with upcoming version of ConfiForms (2.0.4) you will be able to reference via "smart" fields the values, not records

This will enable the design you want. However, the question on how to filter wisely the data in your dropdowns remains - as you are loosing the "rich" context of the record and having just the values (choices) will make them "disconnected" from the other fields these records have

Hey Alex, is there a tentative release date for 2.0.4?

Hm... there have been like 20 versions already since then - have a look https://wiki.vertuna.com/display/CONFIFORMS/Release+Notes

Hey Alex, my mistake. I read 2.0.35 as being 3.5 as in less than 4. I will need to pay closer attention.. Thanks!

As a side note what should I be using then to filter my smart dropdowns on duplicate value rather than unique entries?

I have a few different use cases this is relevant for.

One being Smart Drop downs. the other being an IFTTT that copies form data to a form on another page, which then shows these values in a table. Everytime the first form is submitted ALL records from that form are put in to the second form and so I keep getting multilpe values entered in to my table. I'd be happy to explain more in depth if needed.

As always, thank you so much for your time and expertise!

-Curtis

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Marketplace Apps & Integrations

Marketplace Spotlight: Manage your assets with asset management apps

  The role of IT professionals has become increasingly difficult over the last decade. Our organizations work in an increasingly software-powered world and IT professionals are expected to not...

288 views 3 9
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