Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi ,
Is any possible to copy the variables from one application to another application ?
Ex:
I have created more than 100 variables in my application. I have to copy all variables from one app to another application. Please suggest on this.
Regards,
Sudhakar
Unfortunately it is not possible,
the solution is to create variables in the script with LET and SET instructions.
You can use an include script instead of creating it in qvw file.
Shameem.
Hi
You can extract the variables using a script like this:
Let zFileName = 'C:\Projects\Project1\Model.qvw';
VariableDefinition:
LOAD
Name As Variable.Name,
RawValue As Variable.Definition
FROM [$(zFileName)] (XmlSimple, Table is [DocumentSummary/VariableDescription])
Where Not(IsReserved = 'true' Or IsConfig = 'true');
For i = 0 to NoOfRows('VariableDefinition') - 1
Let zVarName = Peek('Variable.Name', i, 'VariableDefinition');
Let zVarValue = Peek('Variable.Definition', i, 'VariableDefinition');
Let $(zVarName) = zVarValue;
Next
Set the value of zFileName to the model from which you would like to get the variables.
HTH
Jonathan
Hi,
you can download an external plugin called QVPlus, you have the possibility to export variables from there.
Hi Jonathan,
Thanks for your quick response.
I am getting an error while executing the above script,
could you please provide me an sample application for this.
Regards,
Sudhakar
Hi Shamshunnisa,
I have created all the variables through variable overview -->setting option.
could you please tell me how can I export the variable script to import in other application.
regards,
sudhakar
The code given by Jonathan is working. You should replace 'C:\Projects\Project1\Model.qvw'; as per your required file path. Hope you have done that. We can help you if can share the error message or the application with us.
Attaching files for your reference. Variables in Sales dashboard-copy.qvw are extracted to variables.qvw file.
Shameem.