Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Save as (qvf) via data load script

Hi,

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

17 Replies
mdmukramali
Specialist III
Specialist III

Hi,

Unfortunately Section Access will not work with QS Desktop.

Anonymous
Not applicable
Author

OK. Thanks for confirmation.

Normally will I use section access. Unfortunately, this time users have no access to the server.

Anonymous
Not applicable
Author

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.

  • Create a single QVD generator to produce a single QVD with all your data
  • Create 10 qvf's that hardcod in the load script to only load data required
  • Distribute the qvf's to people as required

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.

tomasz_tru
Specialist
Specialist

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?

Anonymous
Not applicable
Author

I agree with you in 100%.

It is 'a bit painful'

We have the server version. The problem is we have not enough licenses...

Anonymous
Not applicable
Author

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

tomasz_tru
Specialist
Specialist

Have you succeeded? What solution have you chosen?

petter
Partner - Champion III
Partner - Champion III

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.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:

BINARY [LIB://Apps/MY_MASTER.qvf];

LET WHERE = SubField(DocumentName(),'.',2);

[DATA]:

NOCONCATENATE LOAD

*

RESIDENT

[DATA]

WHERE

$(WHERE);

DROP TABLE

   [DATA];

RENAME TABLE [DATA-1] TO [DATA];

WHERE=;

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

or

1=1                                will have a full data set - useful as the development UI template application