Qlik Community

Ask a Question

New to QlikView

If you’re new to QlikView, start with this Discussion Board and get up-to-speed quickly.

Announcements
Welcome to our newly redesigned Qlik Community! Read our blog to learn about all the new updates: READ BLOG and REPORTED ISSUES
cancel
Showing results for 
Search instead for 
Did you mean: 
Contributor III
Contributor III

Can any one please help me to understand these two expression?

LET eMultiboxShow = 'Index(' & chr(39) & '|' & chr(39)  & ' & Concat(%Multibox, ' & chr(39) & '|' & chr(39) & ') &

    ' & chr(39) & '|' & chr(39) & ', ' & chr(39) & '|' & chr(39) & ' & $1 & ' & chr(39) & '|' & chr(39) &') > 0';

LET eMultiboxLabel = '$2 & ' & chr(39) & ' ' & chr(39) & ' & GetFieldSelections($1, ' & chr(39) & ', ' & chr(39) & ', 3)';

4 Replies
Specialist
Specialist

Hi

It depends what is confusing you?

Maybe CHR(39) ?

The ' character is used to mark the start and end of a string. This is OK, unless you want the ' character inside your string. In that case CHR(39) is used to represent the ' character.

Hope that makes some sense.

MVP
MVP

These script statements will create two variables by evaluating the part right of the equal sign.

To see the resulting variables, run the script:

Index('|' & Concat(%Multibox, '|') &    '|', '|' & $1 & '|') > 0

$2 & ' ' & GetFieldSelections($1, ', ', 3)


These variables are probably used passing parameters in a dollar sign expansion:

Dollar-sign expansion using parameters ‒ QlikView

Contributor III
Contributor III

HI Richard and Stefan,

Thanks for the reply,

But i am not understanding why so many '|' and why they have used $1

This would be easier to answer if you created an input box with these two variables so you could see what the Let produced.

The | (pipes) are separators for the concat function. $1  a parameter for a parameterised variable expansion. You use it like

     =$(eMultiboxShow('X'))

The above will evaluate the expression with 'X' in the place of the $1.

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