Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikView forum consolidation is complete. Labels are now required. LEARN ABOUT LABELS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

variable definition in Qlikview loadscript

Hi,

I want to define a variable in Qlikview loading script and want to use the expression in the variable inside Qlikview charts. The variable is like this

Set f_CreateSheetId    =    "$1 & PURGECHAR($(=$1 & 'FrontMenu' & $2), ' ')";

I want the expression as it is inside Qlikview. I do not want the expression or any part of the expression to be evaluated in the load script. However, the load script evaluates the part $(=$1 & 'FrontMenu' & $2) in the expression

I have tried using both Let and Set but none of them works. Any idea how to fix this?

Shah

5 Replies
ganeshreddy
Creator III
Creator III

Try this ,

let f_CreateSheetId    =    "$(1) & PURGECHAR($(=$(1) & 'FrontMenu' & $(2)), ' ')";

mohammadkhatimi
Partner
Partner

Hie..

Try this----Write in single quote-----


Set f_CreateSheetId    =    '$1 & PURGECHAR($(=$1 & 'FrontMenu' & $2), ' ')';

Clever_Anjos
Employee
Employee

Set f_CreateSheetId    =    _1 & PURGECHAR(_(=_1 & 'FrontMenu' & _2), ' ');

LET f_CreateSheetId = replace('$(f_CreateSheetId)','_',chr(36));

sasiparupudi1
Master III
Master III

let f_CreateSheetId = '$'&'1 & PURGECHAR($'&'(=$' &'1 & ' & chr(39)&'FrontMenu'& chr(39)&'&' & ' $'&'2),'& chr(39)&' '& chr(39)&')'; 

Not applicable

This seems to work but I have two problems. I have an equal sign at the start of the expression that I forgot to mention earlier so the expression is like below

Set f_CreateSheetId    =    "=$1 & PURGECHAR($(=$1 & 'FrontMenu' & $2), ' ')";

Somehow, I am struggling to escape the equal sign

secondly, I have around 70 expressions like these so it would be good to come up with a generic change that would work for all the expressions that have either equal sign or dollarsign expansion like =$(

Regards

Shah