Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Team,
I already read some threads about moving the variable values in prj folders.I created the same code which is explained in this http://community.qlik.com/docs/DOC-7168
But it seems not working for me at the moment.Let me explain what I am doing here.
I have used the same code in the layout,and ran the script.I had copied the prj folder to another location and there I created a new qlikview document with the same name(except prj) and ran the script again..Here I don't see the variable values in the layout as well as in the new qvd.But I can see the variable values in the qvd which was generated in my original location.
Could you please check and confirm what I am doing wrong here.
Thanks & Regards
Jeba
Try this :
LET vDocumentPath = DocumentPath();
VariableNames:
LOAD
[Name] as VariableName
FROM $(vDocumentPath) (XmlSimple, Table is [DocumentSummary/VariableDescription]);
FOR i=0 TO NoOfRows('VariableNames')
LET varName = Peek('VariableName', $(i), 'VariableNames');
LET varValue = $(varName);
Variables:
LOAD // Load the variable name and value into a table
'$(varName)' AS VariableName,
'$(varValue)' AS VariableValue
AutoGenerate 1;
NEXT
STORE Variables INTO Variables.qvd (QVD);
DROP Tables VariableNames, Variables; // Drop the tables
Hello,
I roughly remember as this may be related to QV version.
Test with a newer one if it's kind of older.
BR
Serhan
Hi
The document in How to store and recover variables contains two script snippets for you to incorporate on your code. You run the Store Variables part from a QV document that has variable values. You run only the Recover Variables tab to recover the variable values.
In your case i think you are running the entire script in the new location, so you are writing empty values to the QVD and then reading those empty values.
HTH
Jonathan
Hi Jonathan,
I am into SVN testing project.I am only moving the prj folder and creating a new qlikview document from there from the moved prj folder.
Not sure how to move only the qvd which was generated in the previous instance
Could you please guide
Regards
Jeba
|
Hi Abhijit,
Creating the variable qvd and calling the same qvd works fine already.
However in this scanario I am not loading the qvd back again.I am only moving the prj folder and creating the layout from the prj folder.As Jonathan said I am reloading the same layout with empty values.
Is there any other alternate way to achieve this?
Regards
Jeba
any help will be highly appreciated
Try this :
LET vDocumentPath = DocumentPath();
VariableNames:
LOAD
[Name] as VariableName
FROM $(vDocumentPath) (XmlSimple, Table is [DocumentSummary/VariableDescription]);
FOR i=0 TO NoOfRows('VariableNames')
LET varName = Peek('VariableName', $(i), 'VariableNames');
LET varValue = $(varName);
Variables:
LOAD // Load the variable name and value into a table
'$(varName)' AS VariableName,
'$(varValue)' AS VariableValue
AutoGenerate 1;
NEXT
STORE Variables INTO Variables.qvd (QVD);
DROP Tables VariableNames, Variables; // Drop the tables