Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Select a listbox value based on a variable's value

Hi,

First things first, I am a huge fan of the the Qlik community and have learnt to solve a lot more problems and understood concepts more than I have from any other source on Qlikview .Kudos to you guys who help out and I hope to get enough acquainted to pitch in my 2 cents sometime soon.


I have a question on how to choose a value in a list box based on a variable's value.

I.e I have a list box with values a,b,c and I have a variable var=a. I would like to set the list box to select to 'a'

Page 1 has a command button which will set var to a and page 2 has the list box.

I have tried a couple of combinations to achieve this without success. Any or help would be much appreciated.

Thank you

1 Solution

Accepted Solutions
swuehl
MVP
MVP

OnInput variable trigger with a Select in field action worked for me.

Alternatively, try a button trigger.

See attached.

View solution in original post

9 Replies
swuehl
MVP
MVP

Maybe use a trigger (e.g. a button trigger or a OnInput/OnChange variable trigger) with a Selection - Select in field action.

Use the list box field to select in an as search string:

=var

Anonymous
Not applicable
Author

Dear Mr, Wuhl,


Thank you for your input.

I tried both OnInput and Onchange variable trigger. No luck. Could I try a different option.

Thanks

swuehl
MVP
MVP

OnInput variable trigger with a Select in field action worked for me.

Alternatively, try a button trigger.

See attached.

trdandamudi
Master II
Master II

Please see the attached and hope this is what you are looking for:

SelectInField_Using_Button.jpg

Anonymous
Not applicable
Author

Perfect ! This works Mr.Wuhl. Thank you.

Just that I have a hierarchy within my list box and thus when I have a 'Activate Sheet' trigger in my hierarchy to navigate to another sheet it doesn't seem to work.

I had 'Always one selected' on the list box properties before in which case 'Select in field' Action doesn't seem to work. Is it possible to have a work around on this one ?

Please find the sample attached for the same.

Thanks

Best,

Harini

johnca
Specialist
Specialist

Perhaps this one?

Input your value for the variable, var, and click the button.

HTH,

John

Anonymous
Not applicable
Author

Thank you for your response Mr. Dandamudi. This solution seems to work as well. But I am hoping to set the variable from within the command which I was able to succeed in doing.

As an extension, I am trying to work to resolve the same selection from within a list box.

Please find the attachment where I have a hierarchy within a list box and I'm trying to select each value from within the hierarchy which should direct me to a page of its own. Right now this doesn't seem to work. Please share your thoughts on the same.

Thanks.

trdandamudi
Master II
Master II

Please see the attached file and hope this is what you are looking for ....

For example, If you select 'A' in the hierarchy it will go to the Sheet1. If you select 'B' in the hierarchy it will go to the Sheet2 and so on ... I used the Field Event Triggers to accomplish this. Hope this helps...

sarasunagaram
Partner - Contributor II
Partner - Contributor II

Hi,

Can you check attached qvw file.

I hope it will be helpful for you.

Thanks,

Muni