Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
yogitamehta10
Creator
Creator

Qliksense script error

Hi ALL,

i'm trying to maintain a file for variable in Qliksense , but when i run this script  .

 

 

i get this error

 

 

 

 
The following error occurred:
Unexpected token: 'Rate', expected: '='
 
The error occurred here:
let vFormConversion >>>>>>Rate<<<<<< = peek('Expression', i, 'Temp_Variables') & chr(10) & '/* NA */'
 
 
 
SCript i'm Using 
 

Temp_Variables:
LOAD Name,
Expression,
Comment
FROM [lib/expressions1.xlsx]
(ooxml, embedded labels, table is Sheet2);

 

// Create variables
for i = 0 to NoOfRows('Temp_Variables') - 1

let vName = peek('Name', i, 'Temp_Variables'); // Name of the variable
let vComment = peek('Comment', i, 'Temp_Variables'); // Comment/description of the variable
let $(vName) = peek('Expression', i, 'Temp_Variables') & chr(10) & '/* $(vComment) */'; // Expression

next i


// Remove temp variables
let i = null();
let vName = null();
let vComment = null();

// Remove temp tables
drop table Temp_Variables;

 

 

any idea please

 
2 Replies
nicu1996
Contributor III
Contributor III

The values for Name must be unique words. 

Sameer9585
Creator II
Creator II

use a different name for expression variable.