Discussion Board for collaboration on QlikView Scripting.
i'm trying to let my load script load from a wildcard file name and filetype.
What is wrong with this script? keeps failing...
The problem is, is that sometimes there will be NO files in this directory...and i just want it to return nothing if that's the case. Though if there are files...i want the script to run.
This would skip if there are no files,
For each file in filelist('D:\Apps2\CUSTOMER\VendorOrder\$(vNewestFolder)\*.*') TestData: Load orderNo, CustomerNo, Date From [$(file)]; Next
But do you need an empty table if there are no files (as there would not be one created as the middle bit would never be called)?
It is possible to create empty table before loading from files:
LOAD * INLINE [
oderNo, CustomerNo, Date];
For each file in filelist('D:\Apps2\CUSTOMER\VendorOrder\$(vNewestFolder)\*.*')Concatenate(TestData) LoadorderNo,CustomerNo,DateFrom [$(file)];Next
In my production enviroment it's just for a mapping table, that I'm ok with not having any data ...just need the script to say if there are no files - we're all good keep going
How would i do it so it loads an empty mapping table??