Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Sep 21, 2022 5:41:49 AM
Oct 30, 2012 10:40:21 AM
QlikView's project (PRJ) folder does not include data, which means that data stored in the QVW file's data model, as well as variable values, are lost when an application is restored from the PRJ folder.
The data in the data model will be restored once the restored QVW file is reloaded. In the same way, variables defined in the load script will be restored.
Variables that have been defined in QlikView desktop client's variable overview section will not be restored as they are not part of the load script.
VariableNames:
LOAD Name AS VariableName
FROM [MyApplication-prj\AllProperties.xml] (XmlSimple, Table is [AllProperties/VariableProperties/VariableProperties]);
FOR i=0 TO NoOfRows('VariableNames')
LET varName = Peek('VariableName', $(i), 'VariableNames');
LET varValue = $(varName);
Variables:
LOAD
'$(varName)' AS VariableName,
'$(varValue)' AS VariableValue
AutoGenerate 1;
NEXT
STORE Variables INTO Variables.qvd (QVD);
DROP Tables VariableNames, Variables;
Variables:
LOAD VariableName,
VariableValue
FROM Variables.qvd (qvd);
FOR i=0 TO NoOfRows('Variables')
LET vVar = Peek('VariableName', $(i), 'Variables');
LET vVal = Peek('VariableValue', $(i), 'Variables');
LET '$(vVar)' = '$(vVal)';
NEXT