Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Customer & Partners, DEC. 9, 11 AM ET: Qlik Product & Strategy Roadmap Session: Data Analytics REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
rafael5958
Creator
Creator

listbox - multiple values

Hi, I tried to find the answer in the posts but didnt find it. I want to merge two columns in one listbox and search this two columns in a table. How can i do it?? For Example:

I have:

ABC
AAAAASDF111
BBBBBQWER222
CCCCCRTY333
DDDDDHJK444
EEEEEEHJKL555
FFFFFFOIY666
GGGGGAAA777
HHHHHVBN888
IIIIICET999

 

I want one listbox with columns A and B, as:

AAAA
ASDF
BBBBB
CCCCC
CET
DDDDD
EEEEEE
FFFFFF
GGGGG
HHHHH
HJK
HJKL
IIIII
OIY
QWER
RTY
VBN

 

And If I look for AAAA I want the result:

ABC
AAAAASDF111
GGGGGAAA777
1 Solution

Accepted Solutions
Zhandos_Shotan
Partner
Partner

Hi

If you mean

And If I look for AAAA I want the result:

ABC
AAAAASDF111
GGGGGAAA777

 

Then try this:

1) Create listbox with expression as field (last item on field selection list)

2) expression: A & ' ' & B

3) Search mode: Wildcard search

So if you search for AAA you can filter by both A and B fields. And ofc you can create concatenated field by script and use it directly.

View solution in original post

6 Replies
Gysbert_Wassenaar

Sorry, that doesn't make sense at all. What relation does the second record (GGGGG, AAA, 777) have with the value AAAA?


talk is cheap, supply exceeds demand
rafael5958
Creator
Creator
Author

Sorry, I miss an A in column B. It was supposed to be:

ABC
AAAAASDF111
BBBBBQWER222
CCCCCRTY333
DDDDDHJK444
EEEEEEHJKL555
FFFFFFOIY666
GGGGGAAAA777
HHHHHVBN888
IIIIICET999

 

and result:

ABC
AAAAASDF111
GGGGGAAAA777
pix
Partner
Partner

Hi,

Probably there are other better solutions, but I tried adding a key to the initial table and then a preceding load:

InitialTable:
LOAD * INLINE [
    A,	B,	C, key_A_B, key_B_A
AAAA,	ASDF,	111,1,1
BBBBB,	QWER,	222,2,2
CCCCC,	RTY,	333,3,3
DDDDD,	HJK,	444,4,4
EEEEEE,	HJKL,	555,5,5
FFFFFF,	OIY,	666,6,6
GGGGG,	AAAA,	777,7,7
HHHHH,	VBN,	888,8,8
IIIII,	CET,	999,9,9
];

SecondaryTable:
LOAD 
 A as A_and_B,
 key_A_B
Resident InitialTable;
Load 
B as A_and_B,
key_A_B
Resident InitialTable

 

Zhandos_Shotan
Partner
Partner

Hi

If you mean

And If I look for AAAA I want the result:

ABC
AAAAASDF111
GGGGGAAA777

 

Then try this:

1) Create listbox with expression as field (last item on field selection list)

2) expression: A & ' ' & B

3) Search mode: Wildcard search

So if you search for AAA you can filter by both A and B fields. And ofc you can create concatenated field by script and use it directly.

View solution in original post

parthesh
Creator
Creator

Hello,

i have tried to achieve your requirement using Script, Please find attached test.qvw.

Please have a look and let me know is it suitable to you or not?

 

Regards,

Parthesh.

pix
Partner
Partner

srry, without last column in InitialTable:
InitialTable:
LOAD * INLINE [
A, B, C, key_A_B
AAAA, ASDF, 111,1
BBBBB, QWER, 222,
CCCCC, RTY, 333,3
DDDDD, HJK, 444,4
EEEEEE, HJKL, 555,5
FFFFFF, OIY, 666,6
GGGGG, AAAA, 777,7
HHHHH, VBN, 888,8
IIIII, CET, 999,9
];

SecondaryTable:
LOAD
A as A_and_B,
key_A_B
Resident InitialTable;
Load
B as A_and_B,
key_A_B
Resident InitialTable