Forums

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

limit list options available in field B once the list field A is set.

Humberto Gomes
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 6, 2021

Hello,

I’m trying to create my first script. (using script runner/behaviors).

 

Scenario:

2 list fields. Example:

Field 1: Account Group:

                             Group1

Gropu2

Group2

Field 2: Account Name:

                                Name1

                                Name11

                                Name111

                                Name2

                                Name22

                                Name 3

                                Name 33

 

The idea is,

if the user selects “Group1” in the first field (account Group),

The second field must show only  Name1, Name11 and Name111 as available options.

 

if the user selects “Group2” in the first field (account Group),

The second field must show only  Name2, Name22 as available options.

 

if the user selects “Group3” in the first field (account Group),

The second field must show only  Name3, Name33 and Name333 as available options.

 

Many thanks.

1 answer

0 votes
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 6, 2021
Humberto Gomes
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 9, 2021

Hi Nic,

 

Many thanks for your answer.

Can you please help to understand the difference between your solution 

https://library.adaptavist.com/entity/set-behaviour-multi-and-single-select-options-and-value

and this one:

Dynamic Select - Adaptavist Library

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 9, 2021

They're both doing much the same thing, just with slightly different inputs.

I'd actually recommend not doing this with a Script.  Your need is met by a cascading-select list, which you can do off-the-shelf without scripting.

Humberto Gomes
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 9, 2021

"I'd actually recommend not doing this with a Script"  Why?

 

A cascading select list, do not allow me to select more than 1 option.

I need to be able to select more than 1 option in the second field.

 

Any other solution?

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 9, 2021

You didn't say you wanted multi-select earlier.  Cascading select won't do that, so yes, use the scripts.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events