Discussion board where members can learn more about Qlik Sense App Development and Usage.
I'm developing an application and need to use FileName(). This function returns nothing and neither does FileBaseName(). FileDir() however returns "lib://QvdLib".
I've found a function called DocumentName() but it returns something like "829askjd89asjk238dshdj29dfjd"
My setup is that I'v developing using Remote Desktop, then via Qlik Sense Hub, and not the Desktop application.
// Doesn't work. Filnamn2 is empty
FileName() as Filnamn2
FROM [lib://QvdLib/rtr_*.qvd] (qvd);
FileName() as Filnamn
(ooxml, embedded labels, table is Blad1);
The help says that filename() should return the file name without the extension for table data sources. This SHOULD include QVD but it doesn't work as you say. It does work for excel table files.
For QVDs I found the following works in place: QvdTableName('file') . See below for an example
FileName() as Filename,
QvdTableName('[lib://Data/Customers.qvd]') as QVDFilename
Good to hear that I'm not the only one experiencing this issue. Unfortunately, your solution does not cover my use case.
I need to know the file name as I load with '*': "(FROM [lib://QvdLib/rtr_*.qvd] (qvd);". I'm loading several files with names like rtr_1.qvd, rtr_2.qvd and I need to capture the number.
There is a good example in "Syntax and Chart function guide", you can customize the following code:
// Example 2 - List all QV related files on disk
sub DoDir (Root)
For Each Ext in 'qvw', 'qvo', 'qvs', 'qvt', 'qvd', 'qvc', 'qvf'
For Each File in filelist (Root&'\*.' &Ext)
'$(File)' as Name, FileSize( '$(File)' ) as
Size, FileTime( '$(File)' ) as FileTime
For Each Dir in dirlist (Root&'\*' )
Call DoDir (Dir)
Call DoDir ('C:')
Logged a case with Qlik this is the response I received:
This is in reference to your case number - 01099753
Subject: Since 3.2.4 function filename() returns no data
A new comment has been posted related to your case :
Thank you for contacting Qlik Support.
If all the files are Excel files, then it is a know bug (bug id QLIK-76421). The bug is already solved internally and most probably will be available in the next service release.
It should work fine with for instance qvd or txt files.
And its there Qlik Sense June 2017
Checked the releasenotes and it should be fixed
FileName() function does not work when loading data from Excel
Jira issue ID: QLIK-76421
Description: The FileName() function returned null instead of the filename.