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

Expression meaning

What does this expression mean please:

LISTECIP:
LOAD Concat(CODE,'#,#') as ListeCODE
resident PRODUIT

;

let liste_code= chr(39)&replace(peek('ListeCODE',0,'LISTCODE'),'#',chr(39))&chr(39);

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Load Concat(CODE, '#,#') as ListeCODE

This section of code concatenates all the codes separated by #,# symbols. That is ListeCODE would have values like:

Code1#,#Code2#,#Code3#,#.....

The variable declaration, reads the value from the field ListeCODE to the variable liste_code after replacing # with char(39)character, i.e. - ' (single quote), and an extra char(39) at the beginning and end of the string. Hence the variable would hold a string like:

'Code1','Code2','Code3',....

Hope this helps.

View solution in original post

1 Reply
tresesco
MVP
MVP

Load Concat(CODE, '#,#') as ListeCODE

This section of code concatenates all the codes separated by #,# symbols. That is ListeCODE would have values like:

Code1#,#Code2#,#Code3#,#.....

The variable declaration, reads the value from the field ListeCODE to the variable liste_code after replacing # with char(39)character, i.e. - ' (single quote), and an extra char(39) at the beginning and end of the string. Hence the variable would hold a string like:

'Code1','Code2','Code3',....

Hope this helps.