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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Variable File path in QlikView Script

Hi,

in our company our QlikView reports are on the internal server.
Not every person have access to the internal server. They only can load the QlikView document to their local place, can edit them there an can re-upload it on the internal server again.

Now, we used to read users out of an excel file, which is on our internal server. So, not everyone have access to the excel file. In our QlikView script i made a TAB "Userlist", which loads the table from the Userlist filepath.

Now, everytime a user want to reload the Report from the local place, he/she got an error message, that they cant access to the Excel File.

Is there a way to edit the script, that when the QlikView file isn't placed on the internal server path, the reload doesn't impy the "Userlist" TAB and let the user reload from their local places. Again, when the QlikView file placed back to the internal server path the "Userlist" TAB is available again.

Any ideas how to manage this?

Thanks in advance.

1 Solution

Accepted Solutions
gandalfgray
Specialist II
Specialist II

use the filesize() function to conditionally load the data

Example:

if filesize('D:\Book1.xls')>0 then
Book1:
LOAD [Client Name],
Date,
Number
FROM
D:\Book1.xls
(biff, embedded labels, table is Sheet1$);
end if;

if you want to display the tab conditionally, create a variable "showUserTab" setting it to 0 before the above if-statement.

Inside the if-statement set it to 1.

In the Sheet properties for the tab click Conditional and enter: showUserTab = 1

View solution in original post

1 Reply
gandalfgray
Specialist II
Specialist II

use the filesize() function to conditionally load the data

Example:

if filesize('D:\Book1.xls')>0 then
Book1:
LOAD [Client Name],
Date,
Number
FROM
D:\Book1.xls
(biff, embedded labels, table is Sheet1$);
end if;

if you want to display the tab conditionally, create a variable "showUserTab" setting it to 0 before the above if-statement.

Inside the if-statement set it to 1.

In the Sheet properties for the tab click Conditional and enter: showUserTab = 1