Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
hammermill21
Creator III
Creator III

Error with "For i = 0 to (vNumberOfRows - 1)"

Hello!

I have the following script: 

 

[Variables-Formulas]:
LOAD
[Variable-Formula],
Expression,
Usage
FROM [lib://Matrix Variables-Formulas (uhealth_54171224)/Matrix Variables-Formulas.xlsx]
(ooxml, embedded labels, table is [Variables-Formulas]);
LET vNumberOfRows = NoOfRows('Variables-Formulas');
For i = 0 to (vNumberOfRows - 1)
LET vVariable_Name = Peek('Variable-Formula',i,'Expression');
LET [$(vVariable_Name)] = Peek('Expression',i,'Expression');
Next

NullAsValue "UMHC SCCC",
"UHealth Tower",
"UMHC BPEI",
"UMHC LFMC",
"UMHC Radiology",
"UMHC Applebaum",
"UMHC Ear Institute",
"UMHC Pain Clinic",
"UMHC Safie",
"UMHC IR Clinic",
"UMHC Coral Spring",
"UMHC Deerfield",
"UMHC Hollywood",
"UMHC Kendall",
"UMHC Plantation",
"UMHC Marlin Park";
SET NullValue = '0';

[Map EC-LS-EM]:
MAPPING Load *
Inline [
EC-LS-EM, Description
EC, Environment of Care
LS, Life Safety
EM, Emergency Management
];

 

Which had been working fine but now I am getting this error:

The following error occurred:
 
The error occurred here:
For i = to

 

I am not really sure what is happening.

 

Any ideas?

THANK YOU!

12 Replies
hammermill21
Creator III
Creator III
Author

I am running a much older version. 

I'm going to see if they can update it for me, maybe that is what the problem is.

 

T

hammermill21
Creator III
Creator III
Author

So I updated to April 2019 and I am still getting that error 😞  I attached the qvf, I'm not really sure what else it can be?

Nicole-Smith

The whole "Governed Metrics" code piece runs fine for me without any errors, and I see the variables have all been defined correctly:

Capture.JPG

You may need to reach out to Qlik Support because I have no idea why it would be working on my machine but not yours.