Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi is there a way to prompt the user (by input box) each time a reload is required for the file name for which the data is to be loaded from?
The excel data file name changes on a monthly basis and therefore it isnt the user friendly option to manually add the path to the load script each time.
e.g. my script currently looks like the following
---------------------
[DEMAND DATA]:
LOAD Month,
CAL_DAYS,
Start_Date,
Real_Data
FROM
[\\C:\Program Files\QlikView\Data\Demand Model Version 10.xls]
(biff, embedded labels, table is [Qlikview Output$]);
--------------------------
Say if the excel data file has changed to 'Demand Model Version 15.xls'. Would it be possible to include a user input box that prompts the user to enter this new name on reload? This file name can then be used to update the load script file path.
Any ideas??
Hi,
Use dollar expansion
FROM [$(vDemandModelPath)](biff, embedded labels, table is [Qlikview Output$]);
Besides, is my custome to enclose in square brackets when spaces or blanks are likely.
Hi J Trof,
We can do this with help of macro (VBscript). Write a macro to get a input from user and store that to a variable, You can use this variable in your load script.
B/w after writing the macro, map the fucntion to BEFORE RELOAD event in document settings so that it will popup the input box for the user to enter the file path and name.
- Sridhar
Hi again,
You can declare a variable to store the answer previous to the load statement
LET vVersion = Input('Please specify version number', 'Warning');
Then create a variable with the path including the answer
SET vPath = C:\Directory\Whatever\Demand Model Version $(vVersion).xls;
Then load the file.
Hope that helps
This code looks very intresting, i`ll try to execute this code today.
one Learning for the day. Thanks
-Sridhar
Hi,
I have added the load script and variable as follows:
LET vDemandModelName = Input('Please demand model file name', 'Warning');
SET vDemandModelPath = C:\Directory\Whatever\Demand Model Version $(vDemandModelName).xls;
How do i add the vDemandModelPath to my load script below:
----------------
[DEMAND DATA]:
LOAD Month,
CAL_DAYS,
Start_Date,
Real_Data
FROM
[\\C:\Program Files\QlikView\Data\Demand Model Version 10.xls]
(biff, embedded labels, table is [Qlikview Output$]);
---------------------------------
i was thinking on the lines of
DEMAND DATA]:
LOAD Month,
CAL_DAYS,
Start_Date,
Real_Data
FROM
vDemandModelPath
(biff, embedded labels, table is [Qlikview Output$]);
and ideas?
Hi,
Use dollar expansion
FROM [$(vDemandModelPath)](biff, embedded labels, table is [Qlikview Output$]);
Besides, is my custome to enclose in square brackets when spaces or blanks are likely.
Many thanks Sridhar!