Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
francisvandergr
Partner - Creator II
Partner - Creator II

Automatic set value in a listbox

Hi,

I have an question. I have to listboxes qwit a few records. For example

Listbox 1                                   Listbox 2

Value  John                               Regio A

Value  Edward                          Regio  B

Value  Marc                               Regio C

What i want in qlikview is that when i select John, also in Listbox 2 a regio is selected for example Regio A. Can i set this with actions ?

1 Solution

Accepted Solutions
whiteline
Master II
Master II

Open your Document properties.

Select triggers tab.

Select "name" in Field event triggers and click "On Select->Edit Actions".

Click Add. Click Ok.

Type in the "Field" box: Region

Type in the "search string" box:

=pick(match(GetFieldSelections(name), 'Stefania', 'Zdislaw', 'Bozydar')+1, GetFieldSelections(Region), 'region B', 'region B', 'region A')

PS: Correct some symbols in names.

View solution in original post

7 Replies
Not applicable

yes, you can do it many ways

for example by document trigger select in field including expression : =FieldValue('Region', FieldIndex('name',name))

check attached qvw file

francisvandergr
Partner - Creator II
Partner - Creator II
Author

Thnx Pari almost the sloution

And is it also possible when i Select John Regio B is selected ?

i found your formula

=FieldValue('Region', FieldIndex('name',name))

What do you exactly mean with formula above ? 

nr 1 in listbox 1 is number 1 in listbox2  and

nr 2 in listbox 1 is number 2 in listbox2 and

nr 3 in listbox 1 is number 3 in listbox2  ? or

                                   

Not applicable

i'll prepere exact solution if you send a small sample file with both fields and write more details about matching values from 1-st and 2-nd field

PS .. in the example I mean exacly what you write.



francisvandergr
Partner - Creator II
Partner - Creator II
Author

Ok I have the follwing listboxes and values


Listbox 1 called : Menu_Consolidation with the values

Balans

Result

Result per period

Administrationcontrol

Compare with last year


Listbox 2 called Rubric with the values :

Balans

Result

What i want is:  when in Listbox 1 Balans is selected, in listbox 2 also Balans is selected

                            when in Listbox 1 Result is selected, in listbox 2 also Result is selected

                            when in Listbox 1 Result per period is selected, in listbox 2 Result is selected

                            when in Listbox 1 Administrationcontrol is selected, in listbox 2 we need no selected field

                            when in Listbox 1 Compare with last year is selected, in listbox 2 we need no selected field

I hope you understand. Thanx for your time!


Not applicable

Here You are:)

(only document trigger ----  Menu_Consolidation on change trigger

francisvandergr
Partner - Creator II
Partner - Creator II
Author

I attached your example qvw

Whta i  want is the following

When Stefania is selected i want also automatic selected the value Regio B in the field Region

When Zdislaw is selected i want also automatic selected the value Regio  B in the field Region

When Bozydar is selected i want also automatic selected the value Regio A in the field Region

Can you help me with this

whiteline
Master II
Master II

Open your Document properties.

Select triggers tab.

Select "name" in Field event triggers and click "On Select->Edit Actions".

Click Add. Click Ok.

Type in the "Field" box: Region

Type in the "search string" box:

=pick(match(GetFieldSelections(name), 'Stefania', 'Zdislaw', 'Bozydar')+1, GetFieldSelections(Region), 'region B', 'region B', 'region A')

PS: Correct some symbols in names.