Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

Store QVD Files using a variable with the path

Hi,

I have problems with my script when I'm using a path variable which is set in an ini-file and the path is UNC path.

I will receive a general script error.

When I type the UNC-path dircectly into the script it will work.

Ini-File:

Set DataHome = "\\FSCL01\Prg-Web-Kredit\temp\rpe\N\Recht\";

Let DataPathQVD_TGL = '$(DataPathRoot)Datenquellen\QVD_aktuell\';

Script:

store Foberedaten into $(DataPathQVD_TGL)Foberedaten.qvd; --this is not working

store Foberedaten into \\FSCL01\Prg-Web-Kredit\Temp\rpe\N\Recht\GOBS\Datenquellen\QVD_aktuell\Forderungsdaten.qvd; --this works

There are many files in the script and I don't want to change every single tab.

Question: What is wrong with my script?

Thanks a lot in advance for some help.

Tags (1)
8 Replies
amartinez35
Valued Contributor

Re: Store QVD Files using a variable with the path

Hi,

If you try

Set DataHome = \\FSCL01\Prg-Web-Kredit\temp\rpe\N\Recht\;

(without ")


Aurélien

undergrinder
Valued Contributor II

Re: Store QVD Files using a variable with the path

Hi Roswitha,

Try this:

set DataHome   = 'DataHome - with quotation marks, it should be a lib connect like lib://example';

set DataPathQVD_TGL = 'lib://$(DataHome)/Other_path'; //With quotation mark, and set

STORE TableName  INTO '$(DataPathQVD_TGL)\TableName.qvd'  (qvd);

It should work.

G.

Not applicable

Re: Store QVD Files using a variable with the path

Sorry this doesn't work

Not applicable

Re: Store QVD Files using a variable with the path

Thanks, I found the problem, one of the directory names were wrong.

undergrinder
Valued Contributor II

Re: Store QVD Files using a variable with the path

I copied it from one of my production code, what is the error message you get?

Not applicable

Re: Store QVD Files using a variable with the path

thanks, it is working as you described.

Employee
Employee

Re: Store QVD Files using a variable with the path

Can you try this, enclosing it in brackets?

store Foberedaten into [$(DataPathQVD_TGL)Foberedaten.qvd];

gompa786
Contributor III

Re: Store QVD Files using a variable with the path

Hi,

Below is my code and it works in  Qliksense.

Qlikaccess :
LOAD
    "Comm_Per 1",
    "Comm_Per 2",
    "Comm_Per 3",
    "Comm_Per 4",
    CostCentre,
    "Comm_Per 5",
    "Access 1",
    "Access 2",
    OPD,
    "Access 3",
    OPD1,
    "Access 4",
    OPD2
FROM [lib://Files (opd_f29121)/Copy of Qliksense Access (3).xlsx]
(ooxml, embedded labels, table is Sheet1);


store Qlikaccess into [lib://Raw_qvd (opd_f29121)/$(x)Qlikaccess_Test_13.qvd];

DataPathQVD_TGL = '$(DataPathRoot)Datenquellen\QVD_aktuell\';

can you please remove the quotes from the path

DataPathQVD_TGL = $(DataPathRoot)Datenquellen\QVD_aktuell\;

and try

[$(DataPathQVD_TGL)Foberedaten.qvd];

Thanks

Community Browser