Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
jim_chan
Specialist
Specialist

how to create a list box with expression

Hi guys,

i have created a list box. it is a code list box for example: 1256, 3478.

So, now i want to add in the name of this code. for example: 12 - apple, 34- green, 56 - banana, 78 - yellow.

Now, in my list box , i have only managed to get result - 1256 green 3478 yellow.

But my expected result has to be

1256 apple,green

3478 banana, yellow

i have attached my sample qvw file with inline data here.

Pls help !!

1 Solution

Accepted Solutions
maxgro
MVP
MVP

try the attachment

1.png

Listbox expression

aggr(concat(code_no, '', order) & ' ' & Concat(name, ',', order), big_code)


Script

dim_code:

LOAD * INLINE [

    code_no, name

    12, apple

    34, banana

    56, green

    78, yellow

];

fact_table:

LOAD * INLINE [

    big_code

    1256

    3478

];

link:

load big_code, left(big_code, 2) as code_no, 1 as order Resident fact_table;

load big_code, Right(big_code, 2) as code_no, 2 as order Resident fact_table;

View solution in original post

1 Reply
maxgro
MVP
MVP

try the attachment

1.png

Listbox expression

aggr(concat(code_no, '', order) & ' ' & Concat(name, ',', order), big_code)


Script

dim_code:

LOAD * INLINE [

    code_no, name

    12, apple

    34, banana

    56, green

    78, yellow

];

fact_table:

LOAD * INLINE [

    big_code

    1256

    3478

];

link:

load big_code, left(big_code, 2) as code_no, 1 as order Resident fact_table;

load big_code, Right(big_code, 2) as code_no, 2 as order Resident fact_table;