Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
i want to import Variables with the import script. Everytime i update my dashboard, the variable is correct importet and which works fine:
SET VarCount = ... count ( {$<Reportingyear={$(=year(today))>} xyz).
Problem is when i try to import this with an include statement $(Include = ....... .txt) the variable will be imported with following error
"count ( {Reportingyear={ (internal error) } xyz)".
Is there a problem with syntax variable with include statements? Does anyone know how to solve this problem??
Thank you very much in advance....
kind regards
Jezze
Hi Jezze,
Whenever QlikView finds the string "$(=" it causes an internal error, although the script keeps loading without reporting it.
There are some workarounds to it, one is to use a different character instead of the "=", like "~" then do a Replace() in a different variable. Another workaround is to use LET instead of SET and use the Chr(36) sign for the dollar:
LET VarCountLET = 'count ( {$<Reportingyear={' & Chr(36) & '(=year(today))>} xyz)';
Hope that helps.
Miguel
I would assume you also run into trouble just using something like
SET VarCount = count ( {$<Reportingyear={$(=year(today))>} xyz);
in your script (without inlcuding from a different file), because of the dollar sign expansion.
It seems to work at your site, so I probably miss something essential here.
Could you upload a working sample qvw (with your original SET statement)? I don't think this sample must do anything else then create the variable, right?
Hi Jezze,
Whenever QlikView finds the string "$(=" it causes an internal error, although the script keeps loading without reporting it.
There are some workarounds to it, one is to use a different character instead of the "=", like "~" then do a Replace() in a different variable. Another workaround is to use LET instead of SET and use the Chr(36) sign for the dollar:
LET VarCountLET = 'count ( {$<Reportingyear={' & Chr(36) & '(=year(today))>} xyz)';
Hope that helps.
Miguel
HI Miguel,
the perfect solution is to use LET statement. It works perfectly fine!!!! Thank you very much!
King regards
Jezze
Hey I am running into the same issue, but when i swap out the string it notes as a script line error. Any idea what's wrong?
LET vSetYTD = {$<MonthID = {"<='&chr(36)&'(=Max(MonthID))"},
Date = {"<='&chr(36)&'(=Max(Date))"},
Year = {'&chr(36)&'(=Max(Year))},
Quarter = ,
Period = ,
[Period (#)] = ,
Month = >};
EK