Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Hide two values from a list box?

Hi,

In my script I have the following inline table:

Qualify*;

Dimension:

LOAD * INLINE [
Dimension, Selection
1, Segment 1
2, Segment 2
3, Segment 3
4, Segment 4
5, Segment 5
6, Segment 6
7, Segment 7
]
;
UNQUALIFY*;

I use the above inline table in a list box - See attached sample.


The above works perfectly at the moment but I now need to create another list box on another tab that doesn't require Segment 6 & Segment 7 (but all other segments are required).  Since I would like to keep the existing inline table I would like to know if its possible to hide Segment 6 and Segment 7 from been displayed in the new list box? 

thanks in advance

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Two separate lists it is. See the attached for a sample solution

Regards

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

9 Replies
Not applicable
Author

Hi,

Please see attached file. I have used expression to exclude the 2 segments in the list box.

Regards,

Janzen

Siva_Sankar
Master II
Master II

Hi Rebelman,  You can use HidePrefix feature. It will help you to convert the field into system fields, but still you can use it in inline for any calculations. Attached the qvw file. Hope it will be helpful.  Regards. Siva Sankar k

Not applicable
Author

Thanks Janzen, very helpful but its still not quite what I'm looking for.  With your solution when Segment 1 is selected in the 2nd list box the first list box automatically selects Segment 1,  Segment 6 and Segment 7.  What I need to get working is when Segment 1 is selected it should automatically select Segment 1 across both list boxes i.e. it should work in the same way when choosing Segment 2,3,4 or 5.  Likewise when Segment 6 or Segment 7 is selected in the first list box the 2nd list box automatically selects Segment 1 in the 1st list box.  Can this be changed so the users last selected option in the second list box or possibly the list box default option gets displayed instead?   I hope this makes sense!

Thanks again

Not applicable
Author

I have included the WILDMATCH in the expression to hide 'Segment 6' and 'Segment 7' but I need to do the following:

At the moment when a user selects a segment from the list box that contains Segments 1 - 5 and then selects either Segment 6 or 7 from the other list box the original selection gets deselected.  Is there anyway to keep the selections?  For example user selects Segment 1 (from the list box containing Segment 1 - 5) then selects Segment 6 from the other list box - I need Segment 1 to be still selected.  Attached is the updated file with the WILDMATCH expression.

Thanks again

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

I would solve this problem like this. First, create a second selection field in the LOAD statement:

Dimension:

LOAD * INLINE [

Dimension, Selection, Selection2

1, Segment 1, Segment 1

2, Segment 2, Segment 2

3, Segment 3, Segment 3

4, Segment 4, Segment 4

5, Segment 5, Segment 5

6, Segment 6

7, Segment 7

];

Note that the values are the same, except that 6 and 7 are null for the second selection. Now use Selection for the list box on the first tab and use Selection2 in the second one.

Because the fields are associated, selecting Segment 1 in the first box will select Segment 1 in the second and vv. If you select Segment 6 or 7 in the first, then nothing will be selected in the second tab.

Hope that helps

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Thanks Jonathan, however when Segment 6 or 7 is selected in the first I need the last selected value in the second.  For example, if a user selects Segment 5 in the second and then selects Segment 6 in the first the second selection should NOT change to no selection i.e. Segment 5 should still be selected.  Any ideas?

jonathandienst
Partner - Champion III
Partner - Champion III

That makes it a little more complicated

The first thing that came to mind was that you will have to create two separate lists and tie them together with field select/change triggers and actions. But I think you can do it with the single list and a couple of bookmarks and a sheet activate and deactivate trigger. I will play with this and post a sample when I have a moment.

Regards

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
jonathandienst
Partner - Champion III
Partner - Champion III

Two separate lists it is. See the attached for a sample solution

Regards

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Hi, Jonathan,

I'm a beginner in qlikview, and I meet the same problem. I'm not able to open the sample file that you've created since I don't have a license. Could you give me same detail on it please? Thx

Regards,

Xu