Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to search for string.

Hi

I am trying to get the name of document path of my QlikView document. The purpose is to store this path in a variable.

So for example my path is c:\MyFolder\MyDoc.qvw.

I want to get : c:\MyFolder\. This will make my document path.

Conventionally I would do some thing like

SUBFIELD('c:\MyFolder\MyDoc.qvw', '*.qvw', 1)

This is not working.

Which string function should I use?

Thanks

Labels (1)
5 Replies
MK_QSL
MVP
MVP

What result you want ?

=SUBFIELD('c:\MyFolder\MyDoc.qvw', '.qvw', 1)

I think you want to store the Path dynamically...

Try below

=Left('c:\MyFolder\MyDoc.qvw',Index('c:\MyFolder\MyDoc.qvw','\',SubStringCount('c:\MyFolder\MyDoc.qvw','\')))

MarcoWedel
MVP
MVP

=Left(DocumentPath(),Len(DocumentPath())-Len(DocumentName()))

Anonymous
Not applicable
Author

why so complicated?

GetFolderPath() will returns folder path of your qvw file

ecolomer
Master II
Master II

SUBFIELD('c:\MyFolder\MyDoc.qvw', '\', -1)


or directly


GetFolderPath ()

MarcoWedel
MVP
MVP

?

QlikCommunity_Thread_134147_Pic1.JPG.jpg