Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Foodie123
Contributor III
Contributor III

Syntax Error

Hello,

I am getting this error I've never seen before. Could someone please explain to me what this error means and what I can do to fix this? 

Foodie123_0-1698688031488.png

Any help is appreciated. Thank you.

Labels (1)
1 Solution

Accepted Solutions
HeshamKhja1
Partner - Creator II
Partner - Creator II

Did it work when you changed 

let vEvalYr = mid($(vEvalYrQuarter),3,2);

 to 

let vEvalYr = mid('$(vEvalYrQuarter)',3,2);

?

View solution in original post

4 Replies
HeshamKhja1
Partner - Creator II
Partner - Creator II

Share the code please.

It seems you are having a variable as the first parameter and the variable is null.

Make sure the variable has a value and enclose it with single quotation like this '$(vString)'

Foodie123
Contributor III
Contributor III
Author

Here is the code:

Foodie123_0-1698688928512.png

let vEvalYrQuarter = Mid(DocumentPath(),117,6);  //ex 201912
     let vEvalYr = mid($(vEvalYrQuarter),3,2);
     let vEvalQuarter = right($(vEvalYrQuarter),2);


Let vLargeLossCutOff=$(vEvalYrQuarter)-500; //Should be 5 Years Prior to eval quarter



let

vAutoLossData='\\Profitability\ActuarialShare\Indications\CW\Auto\$(vEvalYrQuarter)\A$(vEvalYr)$(vEvalQuarter) 16 Loss Datasets.xlsm';


let vAutoTrendData='\\Profitability\ActuarialShare\Indications\CW\Auto\$(vEvalYrQuarter)\Trends - Qlikview\Auto_Trend_Data.xlsx';


HeshamKhja1
Partner - Creator II
Partner - Creator II

Did it work when you changed 

let vEvalYr = mid($(vEvalYrQuarter),3,2);

 to 

let vEvalYr = mid('$(vEvalYrQuarter)',3,2);

?

Foodie123
Contributor III
Contributor III
Author

Yes, this worked! 

Thank you Hesham!