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: 
Anonymous
Not applicable

creating qvds by passing table names into variables

I'm working on a extraction qliksense qvf. I have written a loop which passes the tablename into a variable .But Qliksense throws error the same approch works in qlikview

The following line of code throws error

Capture.PNG

Error.PNG

here the varirable hold table names,pathnames .

Has anybody faced this issue?

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Yes, see this blog post: Qlik Sense Legacy mode


talk is cheap, supply exceeds demand

View solution in original post

9 Replies
Gysbert_Wassenaar

Yes, see this blog post: Qlik Sense Legacy mode


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

Thank you for the quick response

I changed it to StandardReload=0   in the setting.ini  ,closed all the QS instances.Opened a new qliksense instance

but still I can't get the code to work right

Error.PNG

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I think you just have your quotes in the wrong place. Try removing the quotes.

-Rob

reddy-s
Master II
Master II

Hi Balraj,

I think its the Quotes which is causing the issue. Try removing the quotes and run the script.

Thanks and Regards,

Sangram Reddy.

Anonymous
Not applicable
Author

Thank you Sangram and Rob,unfortunately after getting rid of the quotes the tables are stored as' Drop Table tablename.qvd'

Its not able to interpret

$(vPath)\$(vTableName).QVD (QVD);

I have initialized vPath as

Set vPath='//Repository/';

and '//Repository/';

Error.PNG

I also tried sing the the lib statement

2.PNG

Anonymous
Not applicable
Author

the only thing that seems to be working is:

STORE $(vTableName) INTO  $(vTableName).qvd(qvd);

The problem with the above code is it creates the qvds in the qvw_extraction folder ,but I want it to be created in the qvd folder

How about executing a Bat file through qlikSense editor ,this bat file moves all the qvds from one place to another.

Has anybody implemented this ?

Anonymous
Not applicable
Author

I tried
STORE $(vTableName) INTO  $(vTableName).qvd(qvd);

then executed a dos command(bat file) via script editor to move all the qvds to the target location

reddy-s
Master II
Master II

Great!

greenee
Contributor II
Contributor II

I know it's an old post, but might help someone.

Set a variable for the various locations you want to have in a text file.
e.g.  D:\QlikView\QVSScripts\PATHS.TXT

(change the dots for the directories as necessary from where you are doing the creating.qvw)
SET vQVD_Extract = '..\..\Datastore\Extract';  
SET vQVD_Transform = '..\..\Datastore\Transform';

Add the 
$(include=..\..\QVSScripts\PATHS.TXT); to each of your files as a default.

Then just add a variable in front of the 2nd vTableName

STORE $(vTableName) INTO  $($vQVD_Extract)\(vTableName).qvd(qvd);  (for extracted QVDs)
or
STORE $(vTableName) INTO  $($vQVD_Transform)\(vTableName).qvd(qvd);  (for transformed QVDs etc.)

Depending where you want to put them.

Regards

Greenee