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

Checking for File Exist

HI,

In my application I am using document chaining. 3 qvw files in my application.

1.Intro.qvw

2.Geo.qvw

3.Phy.qvw

In my Intro.qvw file contains two buttons.one for Geo & another for Phy view.

All the files are present in 'C:\ss' folder.

If geo file is not present in this folder I need to hide the geo button.

Is there any way to hide button if the corresponding file not exist ?

Thanks

Sibin

1 Solution

Accepted Solutions
vgutkovsky
Master II
Master II

You can't use QVDCREATETIME since that checks for a QVD not a QVW. The only way I know of to do this (without macros), is to set a variable in the script using function filesize() which is a script-only function. Assuming your application hasn't been deleted since the last reload, that should work for you.

Regards,

Vlad

View solution in original post

4 Replies
vgutkovsky
Master II
Master II

You can't use QVDCREATETIME since that checks for a QVD not a QVW. The only way I know of to do this (without macros), is to set a variable in the script using function filesize() which is a script-only function. Assuming your application hasn't been deleted since the last reload, that should work for you.

Regards,

Vlad

sibin_jacob
Creator III
Creator III
Author

Thanks Vlad. Its helped me to solve the issue.

jugrimault
Partner - Contributor III
Partner - Contributor III

Hi,

Good, so can you flag this post as Solved? thks

sdmech81
Specialist
Specialist

May be using in script like:


if FileSize(filename)<>0