Skip to main content Skip to complementary content

Creating reusable load script with QVS files

Create reusable blocks of load script using QlikView script (QVS) files.

You can add a block of Qlik load script to a text editor and save it as a QVS file. The QVS can then be uploaded to Qlik Cloud or added to a web storage provider. You can also download versions of script in History as QVS files. The QVS can be inserted into the load scripts of scripts and apps from your data files or web storage. This allows you to use a single script across multiple apps and scripts. For example, you could use a QVS to:

  • Set variables.

  • Define commonly used subroutines.

  • Set color palettes.

  • Define calendars.

In Catalog, you can view uploaded QVS files and filter them using the Scripts filter. Opening a QVS file opens QVS viewer. Uploaded QVS file access follows space permissions for data source access.

Navigating QVS viewer

In the hub, you can open a QVS file to view it in QVS viewer. QVS viewer contain two sections: Overview and Preview.

Overview contains information about the script and a quick preview of the script. You can see the following information:

  • Owner: Owner of the script.
  • Creator: Creator of the script.
  • Space: Space the script where the script is located.
  • Created date: Date the script was created.
  • File size: Size of the script.

Under Quick view, you can preview the script.

QVS viewer overview

Overview of the QVS file Product.qvs, shoing QVS information and a quick view of the script.

In Preview, you can view the script in more detail. You can open the search panel by clicking Open search panel. You can open the syntax help by clicking Help.

QVS viewer preview, with open search panel

Preview

Creating QVS files

Create QVS files in a text editor outside of Qlik Cloud. Load script history can also be downloaded as QVS files.

  1. Create a block of load script in an app or script.

    Creating your load script in an app or script allows you to test the script first before adding it to a QVS files.

    Alternatively, find a block of load script you want to reuse.

  2. In a text editor, copy and paste the block of load script you want to reuse.

  3. Save the load script as a file with the QVS extension.

You can now upload the QVS file to Qlik Cloud or a web storage provider.

Uploading QVS files

  1. In the Qlik Cloud Analytics hub, click Add newUpload.

  2. Select Script.

  3. Drag and drop your QVS files into the Drop your files here dialog.

    Alternatively, click Browse and navigate to your QVS files.

  4. Select a destination space for the files.
  5. Optionally, add tags to the QVS scripts.
  6. Click Upload.

Editing QVS files

You cannot edit a QVS file in Qlik Cloud. If a file QVS requires changes, make the changes to the file in a text editor and reupload the file.

Limitations

QVS files have the following limitations:

  • Included scripts displays the first 50 QVS files included in the load scripts. If there are more QVS, they will be executed when the load script runs, but will not be listed in Included scripts.

  • Preview for QVS files is not available on mobile.

  • If you previously uploaded QVS load script as a TXT file, the files will still function. They will not be treated as QVS files however unless their file extension is changed to QVS.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!