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

Reloadtime and documentname of a QVW

Hi All,

 

I would like to create a dashboard with the documentname and reloadtime of our qvw-files.

I've also an excel with the dashboardname and the frequence a dashboard shoul reload.

So we can monitor if a dashboard is created on time or if there is an error or ...

Is it possible to get this data out of a qvw?

This is what I was thinking about.

 

Hours:
LOAD Customer,
Hours
FROM
[..\..\Mappings\ReloadHours.xlsx]
(ooxml, embedded labels, table is Sheet1);

let noRows = NoOfRows('Hours')-1;


for i=0 to $(noRows)

let vCustomer=peek('Customer',$(i),'Hours');
let vHours=peek('Aantal_Uren',$(i),'Hours');
let vFileLocation = '..\..\' & '$(vCustomer)' & '\04_Documents\';
let vFilename = '..\..\' & '$(vCustomer)' & '\04_Documents\SiteOperations.qvw';
let vReloadTime = qvdCreateTime('$(vFilename)');


FOR each File in filelist ('$(vFileLocation)' & '*.qvw')

Data:
Load
    qvdCreateTime('$(vFilename)') as Reloadtime,
    filename() as fileName,

 '$(vHours) as Hours
1 as Aantal,
*

FROM $(File);

NEXT File ;
next

Labels (2)
1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

If these are server reloaded QVWs, I expect the FileTime would be equal to the ReloadTime().  If you use the FileTime, there is no need to read the actual QVW.  You can do it it like this:

FOR each File in filelist ('$(vFileLocation)' & '*.qvw')
  Data:
  Load
      FileTime('$(File)') as ReloadTime,
      '$(File)' as fileName
  AutoGenerate 1;
NEXT File ;

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com

View solution in original post

2 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

If these are server reloaded QVWs, I expect the FileTime would be equal to the ReloadTime().  If you use the FileTime, there is no need to read the actual QVW.  You can do it it like this:

FOR each File in filelist ('$(vFileLocation)' & '*.qvw')
  Data:
  Load
      FileTime('$(File)') as ReloadTime,
      '$(File)' as fileName
  AutoGenerate 1;
NEXT File ;

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com

kris_vliegen
Partner - Creator III
Partner - Creator III
Author

Thanks Rob,

This is working fine for me!