Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear Qliktechies,
Here i have a question.
Can we rename an application while saving the Qlikview application using a variable value.
Let's say i have a variable
Let vAppName:- 'ABC'
//Let vAppName:- 'DEF'
//Let vAppName:- 'GHI'
And each time i uncomment one and comment the rest of two and reload the application will save with that variable name.
Here in this case after reloading the application it will be saved as ABC.
Can anyone help me out with this??
Regards
Sunil
From inside the app it would be only per macro possible (unless you used manually F12):
ActiveDocument.SaveAs "C:\Mydoc.qvw"
From an external point of view you could use a copy batch like:
copy „C:\MyApp“ „D:\Backup\MyAppXYZ“
- Marcus
I don't think you can use the ActiveDocument.SaveAs trick to block QlikView/QlikView Server from saving on top of the original document after a reload.
In QlikView Server, the reload will be saved to a temporary file, after which the Distribution Service will copy the temporary file back to the origjnal QVW.AFAIK the Distribution Service doesn't care about executing macro's.
If you plan to interactively do a reload in QV Desktop, then adding a macro that is triggered after the reload will probably fit your requirement.
Peter
That sounds a bit like lop and reduce in QlikView Publisher, where you get multiple output files based on values in a field.
Hej Marcus,
Thanks a lot for you quick reply
Is it possible to do something in the same script without doing it externally.
I have declared the variable inside the Load script only. So accessing variable after reloading @Server won't be a problem. But i need to access the Qlikview Application name (May be it is metadata ).
Regards
Sunil
Hej Peter,
Thanks for your reply!
I need this functionality of dynamically renaming the application which means i just have to comment\uncomment the variable value "vAppName" and the application will be saved with the variable name after reloading the application in Server each time.
It can't be solved using Loop & Reduce as i am not reducing the application based on any value..
Can you please help me with this?
Regards
Sunil
Hej Toni,
Thanks for your reply!
I need this functionality of dynamically renaming the application which means i just have to comment\uncomment the variable value "vAppName" and the application will be saved with the variable name after reloading the application in Server each time after reload.
It can't be solved using Loop & Reduce as i am not reducing the application based on any value..
Can you please help me with this?
Regards
Sunil
It's not possible while the load-execution to save the qvw - also the macro from above won't work because the ActiveDocument didn't exist to that time. But you could create various qvd-output which could be load from these qvw's.
What is the aim from these SaveAs?
- Marcus
Hi Sunil,
How about running a batch script through "Supporting Tasks" or normal task which does the rename after the reload is completed? This way you're not deviating QDS core job of distributing and saving the document. This might be a workaround but I'm not keen on having these things on PROD environment.
Hope this helps!
Cheers,
DV
www.QlikShare.com
If you have a data island and reduce on a field that has no relation to the rest of the data, I guess you would not practically reduce the actual data.