Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Talk to Experts, a LIVE Q&A Webinar. Bring your Qlik Sense Business questions on Aug. 4th. Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator
Creator

Store with variable file name (CSV)

Hi All,

I try to save to a CSV file using STORE command with a variable in the file name.

I get the variable name $(vText) in the file name, like this: Test_$(vText).csv

Here is my script, I narrowed it down to be the least complicated possible:

Let vText= 'SomeText';
InventoryDailyReport:
LOAD
    TransactionType,
    DateThisReportGenerated,
    InventoryAsOfDate,
    InventoryAsOfTime,
    PlantCode
FROM [lib://Microsemi EDI_Schema (win-n5h9rv84sq3_administrator)/InventoryDailyReport_Temp2.qvd](qvd);
   
Store InventoryDailyReport into lib://CSV/Test_$(vText).csv(txt, delimiter is '|');

I looked through many posts regarding this issue, without success.

Any suggestions?

Thanks!

1 Solution

Accepted Solutions
Highlighted
Creator III
Creator III

enquote "lib://CSV/Test_$(vText).csv"

View solution in original post

7 Replies
Highlighted
MVP
MVP

Do you have a data connection to a folder defined that is named CSV? Does it point to a valid folder location?

Highlighted
Creator
Creator

Hi Peter,

Yes, I do. The file is saved in the requested folder, the issue is with the file name which is incorrect and relates to '$(vTest)' as Text.

Highlighted
MVP
MVP

What do you mean then? Do you get an error message when you run the load script or do it store it with a file name that looks like 'Test_(vText).csv' literally without doing the $-sign expansion?

Highlighted
Creator
Creator

I want to have the value of the vTest variable in the file name. I don't get any error, just the file name is wrong.

The wrong file name (What I get): Test_$(vText).csv


Requested file name:  Test_SomeText.csv


Highlighted
MVP
MVP

I tested it in my Qlik Sense Desktop and it works perfectly fine for me.

What is the version of Qlik Sense you are using? Qlik Sense Desktop or Qlik Sense Enterprise and the release number?

Highlighted
Creator III
Creator III

enquote "lib://CSV/Test_$(vText).csv"

View solution in original post

Highlighted
Creator
Creator

Thanks!