Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Access to PathName for .QVW

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.

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

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

View solution in original post

7 Replies
Not applicable
Author

QvWorkPath gives me the path where my .qvw file is located.. not sure why it doesnt work for you Tongue Tied

Not applicable
Author

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.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

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

Not applicable
Author

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.

Not applicable
Author

Rob

My apologies, it was probably too early in the day to try it, figured it out now.

Thanks for your help,

Nigel.

Not applicable
Author


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!

http://community.qlik.com/forums/t/28717.aspx

Not applicable
Author


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.