Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Is it possible to do a conditional load in Qlikview. For example IF(ServerName = QA) do this load with direct path. If not do this load with relative paths? If so, would you post an example? I can't seem to get relative paths to work if it's not selected and the direct path won't work if relative path is selected.
Generally the solution is like:
LET vDataPath = If(ComputerName() = 'QA', 'D:\QlikView\QVD', '..\QVDs');
LOAD ...
FROM [$(vDataPath)\facts.qvd] (qvd);
-Rob
Generally the solution is like:
LET vDataPath = If(ComputerName() = 'QA', 'D:\QlikView\QVD', '..\QVDs');
LOAD ...
FROM [$(vDataPath)\facts.qvd] (qvd);
-Rob
Thanks Rob!
Rob to add to this question. If i'm looking to load from different environments in the same load. I.E. a reconciliation app, I have to use the direct path. However it seems using \\servername\qlikview into the correct directory doesn't work. Is there a specific syntax i'm missing? here is what i'm currently using:
[?????????.?????.corpadqa.net\E:\QlikView\RBA\1.Common\1.2.QVD\1.2.1.Stage1\file.qvd]
I've tried without the drive letter tried adding \\ before the server, and several others.
Edit: I've identified the problem and it's adding a prefix to my direct path shown below in red, where is this prefix stored and how do I change it?
Cannot open file 'Q:\1.Common\1.1.Applications\1.1.1.Stage1\????????.??????.corpadqa.net\E:\QlikView\RBA\1.Common\1.2.QVD\1.2.1.Stage1\1.2.1.Common_PatientFact_ADDate.qvd' The specified path is invalid.
It seems to be interpreting your path as a relative path. The error msg is showing the computed absolute path.
Using "\\" in the front of you path should be interpreted as an absolute path. To debug this you need to look at the actual variable substitution in the Document Log for this LOAD statement.
-Rob