Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Store a file with a relative path

Hello everyone,

When I extract data from file with a relative path, I use this syntax :

FROM

[..\Extract\blabla\subscriptions_offer.qvd]

(qvd);

I would like to do something like that when I store a qvd.

Currently I am using a variable :

Let QVD_Path ='D:\Qlikview_Data\QVD\';

and then in the code : STORE OneTable into $(QVD_Path)QVD_all\OneTable.qvd;

So, I would like to use as well "../.." because when I move my application somewhere else the variable QVD_Path doesn't have the same value. And I don't want to change it each time I move my application.

I've tried STORE  into  ..\..\QVD\QVD_all\OneTable.qvd

But it doesn't work...

In the same folder, I have a folder "Extract" that contains my application and I have a folder "QVD" which contains the stored tables.

Thank you for your help

1 Solution

Accepted Solutions
MVP
MVP

Re: Store a file with a relative path

Hi,

Try like this


STORE  into  ..\QVD\QVD_all\OneTable.qvd

Regards,

Jagan.

9 Replies
MVP
MVP

Re: Store a file with a relative path

Hi,

Try like this


STORE  into  ..\QVD\QVD_all\OneTable.qvd

Regards,

Jagan.

Not applicable

Re: Store a file with a relative path

Got your Question, Its a simple one.  However  your folder structure is not very clear.

Can you tell me

1. Where is your QVW application residing(Absolute Path)

2. Where do you want to place the QVD(Absolute Path)

3. Where you are picking up the QVD's(Absolute Path)

Ram

Re: Store a file with a relative path

You can use the DIRECTORY keyword to set a path first. You can then use relative paths based on the path you set with the DIRECTORY keyword.

DIRECTORY D:\Qlikview_Data\QVD\;

STORE OneTable into  ..\..\QVD\QVD_all\OneTable.qvd


OneTable.qvd will then be created in D:\QVD\QVD_all\OneTable.qvd


Adjust the paths as necessary to match your folder structure.


talk is cheap, supply exceeds demand
Not applicable

Re: Store a file with a relative path

My application is in : D:\Qlikview_Data\Référentiel\ref.qvw

I want to store my new qvd into : D:\Qlikview_Data\QVD

To create my new qvd, I am using QVD that are in Smiley Very Happy:\Qlikview_Data\Extraction

So i cannot really use "directory"  because the qvd i use and the qvd i create are not supposed to be at the same place.

Thanks for your help

Not applicable

Re: Store a file with a relative path

Hi Ram,

My application is in : D:\Qlikview_Data\Référentiel\ref.qvw

I want to store my new qvd into : D:\Qlikview_Data\QVD

To create my new qvd, I am using QVD that are in Smiley Very Happy:\Qlikview_Data\Extraction

thanks for your help

Re: Store a file with a relative path

You can use the DIRECTORY keyword as many times as you need.

DIRECTORY C:\MyFoo;

TableA:

LOAD * FROM Cats.qvd (qvd);

DIRECTORY D:\some\where\else\completely;

STORE TableA into ..\..\in\the\woods;


talk is cheap, supply exceeds demand
Highlighted
Not applicable

Re: Store a file with a relative path

Can you try this.

Store xyz into ..\..\Extraction\xyz.qvd(qvd);

-Ram

Not applicable

Re: Store a file with a relative path

Can you try this.

Store xyz into ..\..\Extraction\xyz.qvd(qvd);

-Ram

Not applicable

Re: Store a file with a relative path

I managed to do it.

Thank you all