21.01.2013 Views

QlikView Reference Manual.pdf - QlikCommunity - QlikView

QlikView Reference Manual.pdf - QlikCommunity - QlikView

QlikView Reference Manual.pdf - QlikCommunity - QlikView

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

GetExtendedProperty ('Greeting')<br />

Back to Other Functions.<br />

File Functions in Script<br />

The file functions (only available in script expressions) return information about the table file which is currently<br />

being read. These functions will return NULL for all data sources except table files (Exception: ConnectString(<br />

)).<br />

Click on the functions that you would like to know more about:<br />

Attribute(filename, attributename)<br />

Returns the value of the meta tags of different file formats, e.g. MP3, WMA, WMV and JPG files, as text.<br />

Example:<br />

Filename is the name of a media file including path, if needed.<br />

Attributename is the name of a meta tag.<br />

If the file filename does not exist, is not a supported file format or does not contain a meta tag named<br />

attributename, null will be returned.<br />

A large number of meta tags can be used, e.g. ‘Artist’ or ‘Date Picture Taken’. The supported tags can<br />

automatically be generated in the script. The keyboard shortcut for this generation is CTRL + Q,J,P,G<br />

for jpg files (keep the CTRL key pressed while typing the QJPG combination), CTRL + Q,M,P,3 for<br />

mp3 files and CTRL + Q,W,M,A for wma files.<br />

Attribute('File', 'Title') as X,<br />

returns the mp3 tag 'title' in field X in each record.<br />

ConnectString()<br />

Returns the active connect string for ODBC or OLE DB connection. Returns an empty string if no connect<br />

statement has been executed or after a disconnect statement.<br />

filebasename()<br />

Returns a string containing the name of the table file currently being read, without path or extension.<br />

Example:<br />

Load *, filebasename( ) as X from<br />

C:\UserFiles\abc.txt<br />

Will return 'abc' in field X in each record read.<br />

filedir()<br />

Returns a string containing the path to the directory of the table file currently being read.<br />

Example:<br />

Load *, filedir( ) as X from<br />

C:\UserFiles\abc.txt<br />

Will return 'C:\UserFiles' in field X in each record read.<br />

fileextension()<br />

Returns a string containing the extension of the table file currently being read.<br />

Example:<br />

334<br />

Load *, fileextension( ) as X from

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!