Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

qvd-filenames in listbox with displaying content

Hi

I have multiple qvd files with the same fields, only the title of the qvd is different:

- CompanyA_sales.qvd

- CompanyB_sales.qvd

Is it possible to make a listbox of the filenames (onlyt the company needs to be displayed)? And when I select a filename, the content of that qvd-file needs be visible.

Are there some way to make this possible?

Greets!

5 Replies
datanibbler
Esteemed Contributor

Re: qvd-filenames in listbox with displaying content

Hi Sander,

out_of_the_box - no idea - but start off by looking at the FILEBASENAME() fct.

HTH

Best regards,

DataNibbler

Not applicable

Re: qvd-filenames in listbox with displaying content

Hi ,

Load like this

Tab1:

Load *,

     'QvdName1' as Qvd

From Qvd1;

Load *,

     'QvdName2' as Qvd

From Qvd2;

Load *,

     'QvdName3' as Qvd

From Qvd3;

MVP
MVP

Re: qvd-filenames in listbox with displaying content

Hi

It sure is possible. If you wildcard-LOAD the qvd files:

Data:

Load *,

     FileBaseName() As QVDSource

From [\\your QVD files location\*.qvd] (qvd);

After loading, create a listbox for QVDSource. If you display the fields from the QVD in a table box or straight table (preferred), then you can select a filename from QVDSource and you will see the contents of the QVD in the table.

HTH

Jonathan

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

Re: qvd-filenames in listbox with displaying content

If you are loading all the qvd files dynamically

Then use this script

 

SET vBaseDir = 'D:\Source';     //Yor source Qvd's Path

DIRECTORY '$(vBaseDir)\';
FOR EACH vFile in FILELIST('$(vFileBaseName)*.qvd')
Source_Temp:
LOAD
*,
'$(vFile)'
AS FileName
FROM [$(vFile)] (ooxml, embedded labels, table is [Report(1)]);     // Modify this as per your qvd load

MVP
MVP

Re: qvd-filenames in listbox with displaying content

see attachment (I used some excel, change to qvd)

1.png

Community Browser