Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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:
A | B | C |
AAAA | ASDF | 111 |
BBBBB | QWER | 222 |
CCCCC | RTY | 333 |
DDDDD | HJK | 444 |
EEEEEE | HJKL | 555 |
FFFFFF | OIY | 666 |
GGGGG | AAA | 777 |
HHHHH | VBN | 888 |
IIIII | CET | 999 |
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:
A | B | C |
AAAA | ASDF | 111 |
GGGGG | AAA | 777 |
Hi
If you mean
And If I look for AAAA I want the result:
A | B | C |
AAAA | ASDF | 111 |
GGGGG | AAA | 777 |
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.
Sorry, that doesn't make sense at all. What relation does the second record (GGGGG, AAA, 777) have with the value AAAA?
Sorry, I miss an A in column B. It was supposed to be:
A | B | C |
AAAA | ASDF | 111 |
BBBBB | QWER | 222 |
CCCCC | RTY | 333 |
DDDDD | HJK | 444 |
EEEEEE | HJKL | 555 |
FFFFFF | OIY | 666 |
GGGGG | AAAA | 777 |
HHHHH | VBN | 888 |
IIIII | CET | 999 |
and result:
A | B | C |
AAAA | ASDF | 111 |
GGGGG | AAAA | 777 |
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
Hi
If you mean
And If I look for AAAA I want the result:
A | B | C |
AAAA | ASDF | 111 |
GGGGG | AAA | 777 |
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.
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.