Discussion board where members can learn more about Qlik Sense App Development and Usage.
is it not possible to reference a variable in the data connection in the lib:// definition?
would like to do
http://URL/$(variable) in my connection but get an Internal Error
Maybe create a lib connection for http://URL called say YourURL and then use it the script as :
Thus adding your variable to the end of the lib connection within the script.
I do have the same issue here, I ran below script but had an issue.. I'll be grateful if you check and let me know
for each vFile in FileList('lib://QlikData/*.qvd')
Load '$(vFile)' as FName,
FileTime( '$(vFile)' ) as FileTime
1 as dummy
Order By FileTime DESC;
drop table Files;
Load * from [lib://QlikData/'$(vMaxFile)'](qvd);
It doesn't load any file, the error is :
The following error occurred:
Cannot open file: 'lib://QlikData/'''
I suspect the issue with line :
You probably need to use the peek() function, maybe something like :
let vMaxFile= peek('FName',0,'LatestFile');
Also you could use Trace to check what is actually stored in the variable :
Trace vMaxFile: $(vMaxFile) ;