QlikView – Scripting

Scripting is a very powerful feature in QlikView, which enables the control of the data load options and data transformations. It enables the use of many inbuilt functions available in QlikView and creates subroutines to be used across multiple scripts within a QlikView document.

Scripting is done using the Script Editor. It is accessed from the File menu usingΒ Script Editor. We can also pressΒ Control +EΒ to open the script editor window. It prepopulates some data formats that are set as default formats for the data to be processed. For example, the Thousand separator is a comma and the date is in the Month-day-year format. These can be changed to suit the incoming data as per the need.

Script Editor Features

Script editor has many features, which are accessed from the menu in the script editor window, which is a different menu from the main menu. Given below is a list of important features.

File Menu

  • Reload βˆ’ Reloads the script and fetches the new data.
  • Upper/Lower Case βˆ’ Converts the case of words as QlikView is case sensitive.
  • Comment βˆ’ Used to comment blocks of code.

Edit Menu

  • Clear Entire Script βˆ’ Clears the active script tab.
  • Open Script File βˆ’ Opens the saved script files.
  • Table Viewer βˆ’ Used to see the tabular view of the data being loaded.

Insert Menu

  • Environment Variables βˆ’ Inserts a standard list of Environment variables.
  • Script Files βˆ’ Allows to browse for script files and insert them.
  • Connect/Disconnect Statement βˆ’ Used to connect or disconnect from external databases.

Tab Menu

  • Insert Tab βˆ’ Inserts a Tab at the current cursor position.
  • Promote/Demote Tab βˆ’ Allows to move the tabs from left to right and vice versa.
  • Merge with Previous βˆ’ Used to merge the content of active tag with previous tab.

Tools Menu

  • ODBC Administrator 64 bit/ODBC Administrator 32 bit βˆ’ Allows to set the correct DSN information for data sources.
  • Editor Preferences βˆ’ Allows you to configure the text font and size, help features, shortcuts, default-scripting engine etc.
  • Syntax Check βˆ’ Used to validate the syntax of the script code.

Leave a Reply