Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Document path without filename

Hi,

I am trying to create a Part in the Script, that I can use for all my qvw-files.

Therefore I created two variables for qvw-path and qvw-Name (and I Need them both!)

LET vDocName = DocumentName();
Let vDocPath = DocumentPath ();

The Problem is now, that vDocPath has already the filename in it.

How can I realise, that the DocumentPath is only the DirectoryPath without the Filename

Thanks in advance for you help.

Chris

1 Solution

Accepted Solutions
sunny_talwar

May be this helps: Re: How to get the path of your QlikView document

As Suggested by :Alessandro

=Mid(DocumentPath(), 1, FindOneOf(DocumentPath(), '\', -1))

View solution in original post

5 Replies
sunny_talwar

May be this helps: Re: How to get the path of your QlikView document

As Suggested by :Alessandro

=Mid(DocumentPath(), 1, FindOneOf(DocumentPath(), '\', -1))

View solution in original post

Peter_Cammaert
Partner
Partner

Skip the vDocPath part after the last backslash. DocumentPath() will always return a string with backslashes.

LET vDocPathNoFileName = left('$(vDocPath)', index('$(vDocPath)', '\', -1));

Not applicable
Author

thanks alot to everybody. it worked.

d_koti24
Creator II
Creator II

HI Christian,

May be this helps:

=mid(DocumentPath(),1,len(DocumentPath())-len(DocumentName())-1)

Regards,

kd

maksimlopatkin
Contributor
Contributor

Hi,

try special variable 'QvWorkPath'