Managing file locations and connection strings
In our current example documents, we have always referred to the Data Files
folder for our source data. If, for any reason, this folder has to be moved somewhere else, we will have to manually change the source data path in many locations in many files.
Let's follow these steps to create an included script file to set the source data folder in a single location:
Open Notepad (by pressing Windows Key + R, typing in
notepad
, and pressing Return) or any other text editor.Enter the following script:
SET vFolderSourceData = '..\Data Files\';
Save the file to the same folder as your QlikView document and call it
Config.qvs
.Close Notepad and return to QlikView's script editor window.
Go to the Include tab and place the cursor on the first line.
Go to Insert | Include Statement and select the
Config.qvs
file.
We have now created an include file that sets the vFolderSourceData
variable to the path of the source data folder.
Note
In a real QlikView environment...