Discussion board where members can learn more about Qlik Sense App Development and Usage.
Is there any option to save an app as another qvf file using the data load script?
The purpose is to:
- run load script
- in the load script create a loop
- in each step of the loop:
-->filter the data using WHERE clause i.e. Sector = 'first_sector'
-->save as app_first_sector.qvf
- go to next loop iteration
Without Qlik Sense Server it will be a bit painful. If Qlik gave everything away for free in the freebie Desktop version they would go bankrupt and there would be no Qlik.
If you goes well and people like Qlik then maybe suggest to those in charge of your money that maybe should consider buying the full server version. As you will in effect have just done a successful Proof Of Concept.
1. Run app that is creating separate QVD's.
2. Use API to reload all the separate end-user apps (each one using different QVD file).
3. Distribute the files.
But this is not the way to do it. It is the moment you should talk to Qlik - if server is not an option, maybe Cloud soultion?
This basically doesn't change a lot, because we still have to duplicate apps in case of any amendments in the "main app"
As I said - we have server version, we don't have so many licences to make all people happy
NOTE! I have made this app to show that the concept is technically possible. This is not meant as any kind of encouragement to break any license rules that is for the Qlik products. It is your own responsibility to check whether your use of this code comply with the licensing of the Qlik products.
Actually by having a MYAPP.qvf with all the data you can create a template for sectors with a single MYAPP.sector X.qvf.
"MY_APP.Sector='Sector A'.qvf" (notice that you have to separate the APP name from the filter by a period).
Then you can make a pure copy of the "MY_APP.Sector A.qvf" into "MY_APP.Sector B.qvf" and so forth. Then you can do a reload of each and each of them will only have data for the relevant sector.
The load script for "MY_APP.Sector A.qvf" does is dynamic and will use the text between the two periods in the file name as a filter for the field named Sector.
MY_APP.qvf will just have the entire load script for all data and no UI. The entire UI you can create in the "MY_APP.Sector A.qvf" this app will also have this load script:
LET WHERE = SubField(DocumentName(),'.',2);
RENAME TABLE [DATA-1] TO [DATA];
You might have to do reloads manually unless you use the API. But 11 reloads is not too bad 😉
I have attached the two applications so you can try it out yourself and extend it. You will have to fix the LIB connection in the "MY_APP.Sector='Sector A'.qvf" to the appropriate folder as the one in the app points to my personal folder...
Replace the text (filter-comes-here) with for instance:
Sector='Sector A' will have a data subset where only Sector A data is part of the qvf
1=1 will have a full data set - useful as the development UI template application