Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Community,
I need to load data out of different locations. Here is what I have setup for this:
// Set the current directory
directory 'C:\Users\xyz\Desktop\';
// folders to load
set FolderScope = 'Folder1','Folder2','Folder3','Folder4','Folder5';
FOR each FilePath in $(FolderScope);
LOAD '$(FilePath)' & '\' & filename() as source,
@1, @2, @3, @4 as @4, @5, @6, @7, @8, @9, @10, @11, @12, @13, @14, @15,
left(@8,4) as year, mid(@8,5,2) as month,
@2 & @3 & @4 & @5 & @6 & @7 & @8 & @9 & @10 & @11 as unikey
FROM [$(FilePath)\*test*] (txt, codepage is 1252, no labels, delimiter is '|', msq);
NEXT FilePath;
I would like to have the line:
set FolderScope = 'Folder1','Folder2','Folder3','Folder4','Folder5';
as a variable line. Ideally users could enter more folders in a file which would be loaded and the script is reading the folders out of that file.
Any ideas how I could accomplish this?
Thanks,
Oliver
Hi, Oliver,
you can enter the variable FolderScope in the layout by using an input box:
Greetings from Munich
Martina
Hi Martina,
thanks for your feedback. But it should be a solution, where the additional folder entered by the user stays.
Let me explain it with an example:
Folder1 and Folder2 are setup, now you need to add another folder (where everytime I update the data I want to pull data out of that folder as well), then I add another one and so on. In the end it can be 100 to 200 different folder locations.
Therefore I was hope to have a solution like with an excel file, where I could read the locations from and combine it into the script.
Greetings from Kennesaw,
Oliver
PS: I was in February in Munich. Was great!
Hi, Oliver,
do I understand right, that different users enter different foldernames? Than the users can store them by click on a button. Than you can use this stored data in your script and concatenate many variables to one.
Yes, Munich is great, where is Kennesaw situated?
greetings
Martina
Hi Martina,
yes, that is right, but they don't have to do it necessarialy out of Qlikview, they can enter that information also directly in an Excel file.
Kennesaw is north of Atlanta.
Oliver
PS: I am originally from Germany 🙂 Just moved here 8 years ago.
Hi, Oliver,
nice to hear that, last year I was in Florida and I had to change my airplane in Atlanta. And because lots of planes were in the air we had to turn round Atlanta for more than an hour. It looked very fine from the sky!
All the best to you and greetings from good old Germany
Martina
Well, then you know the area 🙂
Any good ideas on my problem?
Oliver