Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi fokls,
I have a folder with several QVS files and I want to load all them at once in Qlik Sense.
I'm trying to use must include, but I see that I have to specify the file name, that is not my purpose.
The script below works, but I added the full file name:
$(Must_Include=[lib://LATAM Qlikview Storage/IT/3.Include/Scripts/code1.qvs]);
I want to load all qvs files from a folder, but the following format does not work as it works for instance for csv files during the load script.
$(Must_Include=[lib://LATAM Qlikview Storage/IT/3.Include/Scripts/*.qvs]);
I think I have to add the Must_Include statement into a loop, but I don't really know the best practice do load all files at once using Must_Include.
Could you please help?
Tks
Rubens
im afrraid that's not going to work
you will need to first recover the file list from folder
and then include one by one
something like
sub DoDir (Root)
for each Ext in 'qvs'
for each File in filelist (Root&'\*.' &Ext)
$(Must_Include=[$(File)]);
next File
next Ext
for each Dir in dirlist (Root&'\*' )
call DoDir (Dir)
next Dir
end sub
call DoDir ('lib://LATAM Qlikview Storage/IT/3.Include/Scripts')
could have some syntax error, couldnt tried.
Best,
it is possible to loop to the qvs files and do a must include.
please take a look at the following link. example 2 might explain what you need.
im afrraid that's not going to work
you will need to first recover the file list from folder
and then include one by one
something like
sub DoDir (Root)
for each Ext in 'qvs'
for each File in filelist (Root&'\*.' &Ext)
$(Must_Include=[$(File)]);
next File
next Ext
for each Dir in dirlist (Root&'\*' )
call DoDir (Dir)
next Dir
end sub
call DoDir ('lib://LATAM Qlikview Storage/IT/3.Include/Scripts')
could have some syntax error, couldnt tried.
Best,
Thank you guys!!
I followed your recommendation and created the script below and worked:
For Each vs.File in FileList ('lib://LATAM Qlikview Storage/folder/*.qvs')
$(must_include=$(vs.File));
Next vs.File; vs.File=;
Tks
Rubens