Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Use function in store into string

Hello,

Does anyone know if it is possible to use a function when you use store into?

Let's say I want the filename to be NameOfFile_20120216.txt

When I try the following QV complains about an "Unknown file format specifier"

store * from Table into D:\QlikViewSystems\PCD\Web\3_Load\NameOfFile_'&today()&'.txt (txt, delimiter is ';');

br

Martin

1 Solution

Accepted Solutions
ekech_infomotio
Partner - Creator II
Partner - Creator II

I wouldn't put any functions directly into the store-statement. But you can put your function into a variable

let vExportFilename = 'D:\QlikViewSystems\PCD\Web\3_Load\NameOfFile_' & today() & '.txt';

store * from Table into $(vExportFilename) (txt, delimiter is ';');

regards,

Edgar

View solution in original post

3 Replies
ekech_infomotio
Partner - Creator II
Partner - Creator II

I wouldn't put any functions directly into the store-statement. But you can put your function into a variable

let vExportFilename = 'D:\QlikViewSystems\PCD\Web\3_Load\NameOfFile_' & today() & '.txt';

store * from Table into $(vExportFilename) (txt, delimiter is ';');

regards,

Edgar

jagan
Luminary Alumni
Luminary Alumni

Hi,

Assign the file path into a variable like this

LET fileName = 'D:\QlikViewSystems\PCD\Web\3_Load\NameOfFile_'&today()&'.txt (txt, delimiter is' & char(39)& ';' & char(39) & ')';

Now assign the filename

store * from Table into $(fileName);

Hope this helps you.

Regards,

Jagan.

giakoum
Partner - Master II
Partner - Master II

Both jagan and Edgar are correct, however you need to format the date otherwise the windows filesystem will not recognise this as a valid file name :

let vExportFilename = 'temp' & date(today(),'dd-mm-yy') & '.txt';

store temp into $(vExportFilename) (txt, delimiter is ';');

BS, Ioannis