Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
vinayakg
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
richard_chilvers
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.

swuehl
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

vinayakg
Contributor III
Contributor III
Author

HI Richard and Stefan,

Thanks for the reply,

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

jonathandienst
Partner - Champion III
Partner - Champion III

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