How to establish cascading check boxes/multi select in confluence form?
Asked by sumer bhalla:

I have two smart multi selects. These are backed by a table view.

One for GENRE (Fruits, Vegetables, Dairy).

Other one for corresponding values (Apple, Banana, Carrot, Peas, Milk, Eggs).

Based on my selection on first multi select, values in second multi select should show.

**Condition**: My user has to select multiple genres.

Filtering is working fine, if user selects just one option in genre.

I need filter to work when two options are selected. For example: if Fruits and Vegetables both are selected in first multi select, second one should show (Apple, Banana, Carrot, Peas).

**Goal**: idea is to restrict user to select from available options only. I don't want my user to be selecting eggs, if user is looking for fruits or vegetables.

**Note** : I am a naive user here. Looking for a easier approach.![PXL_20240913_114902625~2.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/347332i5148D44B2A371355/image-size/large?v=v2&px=999 "PXL_20240913_114902625~2.jpg")![PXL_20240913_114848762~2.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/347331i50C19B2855D5B1E1/image-size/large?v=v2&px=999 "PXL_20240913_114848762~2.jpg")![PXL_20240913_115044827~2.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/347330i016B0A49AA3C54C4/image-size/large?v=v2&px=999 "PXL_20240913_115044827~2.jpg")


Answers:
author: Alex Medved _ConfiForms_
body: Hi [@sumer bhalla](/t5/user/viewprofilepage/user-id/5591771)

Added some labels to the question, so it would be easier to understand that it's ConfiForms related

From the original question it is rather difficult

Anyway, have a look at [this video I have recorded for you](https://wiki.vertuna.com/download/attachments/178782502/Community%20-%20How%20to%20establish%20cascading%20check%20boxes%3Amulti%20select%20in%20confluence%20form.mov?version=1&amp;modificationDate=1726249400863&amp;api=v2)

Hope it helps

Alex

comments: author: sumer bhalla
body: Thanks [@Alex Medved _ConfiForms_](/t5/user/viewprofilepage/user-id/781630) it worked perfectly fine. Do you have any page listing such syntax?

Another issue: I want to use the info value attached to this record. Where info is the third column in the table. Below syntax is not working. OptionInfo is the text field to show the info value.

OptionInfo:\[entry.OptionSM.Info\]


author: Alex Medved _ConfiForms_
body: What the "OptionInfo:\[entry.OptionSM.Info\]" should do? What are you trying to filter and where?


author: sumer bhalla
body: I am trying to get the value from third column of the table. I have to show it in a text field on the form as well as our it on the JIRA issue.

Basically selection of Genre and Option will filter out the info.


author: Alex Medved _ConfiForms_
body: What it should show when you have multiple Options selected?


author: sumer bhalla
body: It should concatenate the values in Info column, and put it on the text field as well as in the JIRA.


author: Alex Medved _ConfiForms_
body: OK, something like this then![Screenshot 2024-09-16 at 10.41.21.png](https://community.atlassian.com/t5/image/serverpage/image-id/347474i0A9A31AF1EDB92CD/image-size/large?v=v2&px=999 "Screenshot 2024-09-16 at 10.41.21.png")

![Screenshot 2024-09-16 at 10.41.30.png](https://community.atlassian.com/t5/image/serverpage/image-id/347475i558E45F04477A7BE/image-size/large?v=v2&px=999 "Screenshot 2024-09-16 at 10.41.30.png")


author: sumer bhalla
body: [@Alex Medved _ConfiForms_](/t5/user/viewprofilepage/user-id/781630)

I need to print "Eggs Info; Milk Info" in Option Info field.

1. How will it filter out the value from ***Info*** based on ***Option*** selected? Because i have tried Set value ruke and used this under Values to set ***OptionInfo=\[entry.OptionSM.Info\]***, but it is not working.
2. Where should i put ***OptionSM.transform(info).asList?***
3. How can I fetch the Info values to put in JIRA issue while creating it?

![PXL_20240913_114848762~2.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/347331i50C19B2855D5B1E1/image-size/large?v=v2&px=999 "PXL_20240913_114848762~2.jpg")

Basically i want to do following:

Set OptonInfo = (Value from Info column) where Genre is selected Genre and Options are selected Options.


author: Alex Medved _ConfiForms_
body: Honestly, makes no sense to me, but you can use the iterateAnPrint function, for example

```
OptionsSM.iterateAndPrint([entry.Options] [entry.Info] )
```

I do show exactly on my screenshots where to put these things...

Anyway, if you still want to have something like a Set Value rule... (and copy values over, insted of referencing them realtime) then

the expression for the parameters would be

```
OptionInfo=[entry.OptionsSM.iterateAndPrint([entry.Options] [entry.Info] )]
```


author: sumer bhalla
body: Let me rephrase the ask.

I want to get the value from Info column and set to a text field OptionsInfo, based on the selections made on Genre(GenreSM) and Options(OptionsSM).![PXL_20240913_115044827~2.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/347330i016B0A49AA3C54C4/image-size/large?v=v2&px=999 "PXL_20240913_115044827~2.jpg")


author: Alex Medved _ConfiForms_
body: I get that - I have no idea why would yo do that... but OK, you can see my previous comment that answers your "ask"


author: sumer bhalla
body: [@Alex Medved _ConfiForms_](/t5/user/viewprofilepage/user-id/781630)

I guess i got the solution.

**Issue** : I was not able to get the value from Info column using ***OptionInfo=\[entry.OptionSM.info\]***

**Reason**: Reference to records checkbox was not checked for OptionSM

**Lesson:**Reference to records checkbox need to be checked, if user wants to filter out the Info from third column, based on selections made on first two columns.

**Observation**: If Reference to records checkbox is checked, and Option column has same value for two different Genre, then form will display that same value twice. And user has to select both to get the Info.

![PXL_20240916_192631708~2.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/347594iE8567767DC1CBAC0/image-size/large?v=v2&px=999 "PXL_20240916_192631708~2.jpg")![PXL_20240916_192653758~2.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/347595iB54620D9E48E0C45/image-size/large?v=v2&px=999 "PXL_20240916_192653758~2.jpg")


author: sumer bhalla
body: Thanks a lot [@Alex Medved _ConfiForms_](/t5/user/viewprofilepage/user-id/781630)


author: sumer bhalla
body: [@Alex Medved _ConfiForms_](/t5/user/viewprofilepage/user-id/781630) Can you help here? Thanks in advance.


author: Radek Dost?l
body: Well, clearly this isn't native, it's custom, thus it's more for <https://community.developer.atlassian.com>

Whoever has made those html forms knows how the select lists (which seems like select2, most likely atlassian aui select2 fork) are set up, and there will be something in javascript that makes the current filtering work.

That depends on how those select2 fields are set up to do searches - whether it's server-side, where you would need to make the filtering inclusive for multiple options, or whether it's client-side, in which case, the javascript code needs to be made inclusive for multiple options.

Can't suggest anything concrete without seeing either the javascript or the backend filtering api method.

comments: author: sumer bhalla
body: [@Radek Dost?l](/t5/user/viewprofilepage/user-id/715713) Can you explain in simple words? Are you saying that behavior of these multiselect is done at organizational/admin level?

I am using ConfiForms Field Definition and ConfiForms rules for Field Definition.

And here multiselect behaving with **AND** condition between Dairy and Veggies. I want it to behave with **OR** condition between Dairy and Veggies.


author: John Funk
body: Hi Sumer - Welcome to the Atlassian Community!

Can you share a screenshot of what you have?

comments: author: sumer bhalla
body: [@John Funk](/t5/user/viewprofilepage/user-id/7148) screenshots added


author: sumer bhalla
body: [@Alex Medved _ConfiForms_](/t5/user/viewprofilepage/user-id/781630) any help?


Tags: addon-com.vertuna.confluence.plugins.confiforms

cascading

confiforms

confluence-unknown-hosting-type

multi-select

nesting

unknown-hosting-type