Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
robmarr789
New Contributor

Access the same script from two different Qlikview files

So basically I'm after some suggestions.

I have a qlikview file which has a number of charts and visualisations. The charts uses fields from numerous tables I have brought in from SQL and Excel via the Script editor and in line loads.

I also  want to create a 2nd Qlikview file which will have a different set of charts and visualisation. It will however utilise the exact same script as the first file.

The script however will need to be changed and modified regularly.

My questions is therefore, how do I utilise the same  script across both qlikview files? And when I modify the script how do I ensure it updates both files. At the moment I'm manually changing one script when I alter the other which is very time consuming.

 

It is imperative I have 2 Qlikview files, I do not want to restrict tabs in one file.

I have a feeling this can be done using QVD files but I don't know where to start.

 

A descriptive explanation of how this is done would be much appreciated as I have no experience of this....

 

Thanks a lot! 

Labels (2)
1 Solution

Accepted Solutions
Vegar
Honored Contributor

Re: Access the same script from two different Qlikview files

If you are to use the exact same script and datamodel then you can also re-use an qvw datamodel by using binary load on the first row in your qlikview application script. 

Binary [c:/Qlik/My master document.qvw];

Read more about Binary load here: https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/Scripting/ScriptRegularS...

Please ekskuse my Norglish and Swenglish typos.
2 Replies
Vegar
Honored Contributor

Re: Access the same script from two different Qlikview files

You can keep your load script in an external script file and include this file in as many QlikView files as you like.

 

$(Include=c:\qlik\LoadScript\TransformMyApp.qvs);

When handling script outside of the QlikView client you will need a text editor. I would recomend a text editor where Qlik script syntax highlighting is available, eg Notepad++ or Sublime.

My favourite editor is Sublime I've even written an guide on how to get started with Qlik scripting using sublime a couple of years ago. You'll find it at this adress: http://aqlik.se/2017/01/sublime-for-qlik-development-in-8-steps/

Please ekskuse my Norglish and Swenglish typos.
Vegar
Honored Contributor

Re: Access the same script from two different Qlikview files

If you are to use the exact same script and datamodel then you can also re-use an qvw datamodel by using binary load on the first row in your qlikview application script. 

Binary [c:/Qlik/My master document.qvw];

Read more about Binary load here: https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/Scripting/ScriptRegularS...

Please ekskuse my Norglish and Swenglish typos.