Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

File path in QvdCreateTime

Hi:

I was trying to use QvdCreateTime to check if a qvd file is exist or not.

At first, I was trying to use relative path in my script as followed (I already set my directory to a file called 'Data'. The qvd file sits in the 'QVD' file in side 'Data' file):

IF (NOT ISNULL(QvdCreateTime('QVD\MyQvdFile.qvd'))) THEN

     //Do something

END IF

But the above code always skip.

Then I change it to a absolute path and it worked and the script inside get executed.

I want to ask how can I use the relative path in QvdCreateTime? Or it is default not to use relative path?

Thank you very much.

Best regards,

Paco

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Qvdxxx() functions can use certainly use relative paths. These are relative to the location of the qvw file. Unlike LOAD statements, they do not follow the DIRECTORY option, only the qvw document location.

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

6 Replies
senpradip007
Specialist III
Specialist III

Try this....

IF (NOT ISNULL(QvdCreateTime('..\QVD\MyQvdFile.qvd'))) THEN

     //Do something

END IF

Not applicable
Author

Hi Pradip:

Doesn't '..' take you to one level up in the directory?

Thanks.

PC

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Qvdxxx() functions can use certainly use relative paths. These are relative to the location of the qvw file. Unlike LOAD statements, they do not follow the DIRECTORY option, only the qvw document location.

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
senpradip007
Specialist III
Specialist III

Could you please tell me absolute path or folder structure of your project?

Not applicable
Author

Hi Jonathan:

I didn't know that DIRECTORY doesn't work on QvdCreateTime() functions.

Thank you very much.

PC

Not applicable
Author

Hi Pradip:

Thank you very much for your reply.

As Jonathan suggested that, QvdCreateTime() functions does not follow the DIRECTORY options.

I think that's the reason why my script doesn't work.

Best regards,

PC