Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Folks
Does anybody know if I can access a variable in QlikView that will tell me where the .QVW is located?
I have tried:
QvWorkPath - gives me the directory where I'm storing QVD files
QvPath - gives me the c:\Program Files\QlikView directory
QvRoot - gives me the root directory of the QV.EXE executable (i.e. C:)
QvWorkRoot - gives me the root directory of the QVD files (i.e. D:)
But, nothing I can find will tell me where I launched the QVW from (i.e. D:\QlikView\User_QVW\DarqMatter)
Any help appreciated.
Regards,
Nigel.
I think the function you want is DocumentPath().
A word of caution on using the QvWorkPath variable. This variable is not set until the end of the script (as of 8.5?) . In script execution, the value is what it was at the end of the last script execution. This means that if the document is moved, the first run of the script will see the value of the old directory. Therefore fairly useless in script.
-Rob
QvWorkPath gives me the path where my .qvw file is located.. not sure why it doesnt work for you
Thanks for the response, I'm assuming that the reason is that we are using a redirection on the directory where we store QVD Files, so one of the first lines in our load script is:
Directory \QlikView\QVD
I suppose that's what's doing it.
Maybe, if I could work out how to do it, I should allocate the QvPath to a variable before I change the directory......
Cheers,
Nigel.
I think the function you want is DocumentPath().
A word of caution on using the QvWorkPath variable. This variable is not set until the end of the script (as of 8.5?) . In script execution, the value is what it was at the end of the last script execution. This means that if the document is moved, the first run of the script will see the value of the old directory. Therefore fairly useless in script.
-Rob
Hi Rob
This seems to be exactly what I'm looking for, the only issue I have is that whilst I can use this in an expression, I can't figure out how to use it in the load script (this will be used to connect to different databases on Development, Staging and Production servers).
Thanks,
Nigel.
Rob
My apologies, it was probably too early in the day to try it, figured it out now.
Thanks for your help,
Nigel.
Nigel West wrote:
This seems to be exactly what I'm looking for, the only issue I have is that whilst I can use this in an expression, I can't figure out how to use it in the load script (this will be used to connect to different databases on Development, Staging and Production servers). <div></div>
Hope below link will help you out!
Rob Wunderlich wrote:
I think the function you want is DocumentPath().
A word of caution on using the QvWorkPath variable. This variable is not set until the end of the script (as of 8.5?) . In script execution, the value is what it was at the end of the last script execution. This means that if the document is moved, the first run of the script will see the value of the old directory. Therefore fairly useless in script. <div></div>
I am using Version: 9.00. Is this issue still persists in this version also as I am using this function(QvWorkPath) currently in one my document.
If still persists please do let me know what is the alternative way to find the path which I can use it in my load script.