Qlik Sense File System Access Restrictions

Earlier we discussed Qlik Sense Visualizations. Today, we will see Qlik Sense FileSystemm. This tutorial deals with security and file system access restriction issues in Qlik Sense. We will discuss the different access modes and what functionalities were supported by them depending on the access restrictions they have.

So, let’s start Qlik Sense File System Access Restrictions Tutorial.

Qlik Sense File System

Qlik Sense File System Access Restrictions

1. Qlik Sense File system

In Qlik Sense, access to the file system i.e. the absolute or relative path of system files depends upon which mode the user is using. There are two modes, namely, Standard mode and Legacy mode. In the standard mode, no such file path or function or variable is supported which exposes or gives the user access to the file system. So, if a user wants to gain access into the file system and use complete file paths to system files, then standard mode must be disabled. Instead, a legacy mode is activated which is not as secure as the standard mode and makes the system files susceptible to risk.

2. What are the Limitations in Standard Mode?

If you use the unsupported functions and variables in the data load script while working in the standard mode, then the error is produced by the system. While the error is generated, then the script returns NULL.

In this section, we will discuss some system variables, regular script statements, script control statements, file functions, and system functions.

i. System Variables

  • Variable: Floppy (First letter of the floppy drive, like a: etc.)

Standard mode/ Qlik Sense Cloud: Not supported

Legacy mode: Supported

  • Variable: CD (First letter of the CD ROM drive.)

Standard mode/ Qlik Sense Cloud: Not supported

Legacy mode: Supported

  • Variable: QvPath (Returns the path to the Qlik Sense executable file.)

Standard mode/ Qlik Sense Cloud: Not supported

Legacy mode: Supported

  • Variable: QvRoot (Returns the root directory to the Qlik Sense executable file)

Standard mode/ Qlik Sense Cloud: Not supported

Legacy mode: Supported

  • Variable: QvWorkPath (Returns the browse string of the currently opened Qlik Sense app)

Standard mode/ Qlik Sense Cloud: Not supported

Legacy mode: Supported

  • Variable: QvWorkRoot (Returns the root directory of the currently opened Qlik Sense app)

Standard mode/ Qlik Sense Cloud: Not supported

Legacy mode: Supported

  • Variable: WinPath (Returns the browse string of the Windows)

Standard mode/ Qlik Sense Cloud: Not supported

Legacy mode: Supported

  • Variable: WinRoot (Returns the root directory of the Windows)

Standard mode/ Qlik Sense Cloud: Not supported

Legacy mode: Supported

  • Variable: $(include=…) (This variable stores a file containing the text which must be included in the data load script during execution)

Standard mode/ Qlik Sense Cloud: Supported

Legacy mode: Supported

ii. Regular Script Statements

  • Statement: Binary

Description: Loads data from other apps.

Standard mode/ Qlik Sense Cloud: Supported

Legacy mode: Supported

Recommended Reading – Qlik Sense Troubleshooting

  • Statement: Connect

Description: Establishes a connection to databases using ODBC or OLE DB connections.

Standard mode/ Qlik Sense Cloud: Supported

Legacy mode: Supported

  • Statement: Directory

Description: Gives the name of the directory.

Standard mode/ Qlik Sense Cloud: Supported

Legacy mode: Supported

  • Statement: Execute

Description: Runs and executes other programs while data is loaded in Qlik Sense’s memory.

Standard mode/ Qlik Sense Cloud: Not Supported

Legacy mode: Supported

  • Statement: LOAD from…

Description: Returns the browse string of the QS executable file.

Standard mode/ Qlik Sense Cloud: Supported

Legacy mode: Supported

  • Statement: Store into…

Description: Returns the root directory of the QS executable file.

Standard mode/ Qlik Sense Cloud: Supported

Legacy mode: Supported

iii. Script Control Statements

  • Statement: For each…

Filelist mask/dirlist mask

Description: The filelist mask returns the list of all files separated by comma present in the current directory.

And, dirlist mask returns a list of all directories separated by comma present in the current directory

Standard mode/ Qlik Sense Cloud: Supported

Legacy mode: Supported

iv. File Functions

  • Function: Attribute()

Description: For meta tags of the media files.

Standard mode/ Qlik Sense Cloud: Supported

Legacy mode: Supported

  • Function: ConnectString()

Description: Connect strings corresponding to ODBC or OLE DB connections.

Standard mode/ Qlik Sense Cloud: Supported

Legacy mode: Supported

  • Function: FileDir()

Description: Path of the directory corresponding to the table file currently being read.

Standard mode/ Qlik Sense Cloud: Supported

Legacy mode: Supported

  • Function: FilePath()

Description: Full path of the table file being read by the script engine.

Standard mode/ Qlik Sense Cloud: Supported

Legacy mode: Supported

  • Function: FileSize()

Description: File size (in bytes) of a specific file or the table currently being read.

Standard mode/ Qlik Sense Cloud: Supported

Legacy mode: Supported

  • Function: FileTime()

Description: Timestamp of the last modification done in a file.

Standard mode/ Qlik Sense Cloud: Supported

Legacy mode: Supported

  • Function: GetFolderPath()

Description: Full path for a Microsoft Windows folder.

Standard mode/ Qlik Sense Cloud: Not supported

Legacy mode: Supported

  • Function: QvdCreateTime()

Description: Timestamp as an XML-header for a QVD file.

Standard mode/ Qlik Sense Cloud: Supported

Legacy mode: Supported

  • Function: QvdFileName()

Description: Name of a field in a QVD file, corresponding to its field number.

Standard mode/ Qlik Sense Cloud: Supported

Legacy mode: Supported

  • Function: QvdNoOfFields()

Description: Total number of fields in a QVD file.

Standard mode/ Qlik Sense Cloud: Supported

Legacy mode: Supported

  • Function: QvdNoOfRecords()

Description: Total number of records in a QVD file.

Standard mode/ Qlik Sense Cloud: Supported

Legacy mode: Supported

  • Function: QvdTableName()

Description: Name of the table stored in a QVD file.

Standard mode/ Qlik Sense Cloud: Supported

Legacy mode: Supported

v. System Functions

  • Function: DocumentPath()

Description: Full path of the currently read Qlik Sense app/document.

Standard mode/ Qlik Sense Cloud: Not supported

Legacy mode: Supported

  • Function: GetRegistryString()

Description: Value of a registry key with a defined name and a given registry path.

Standard mode/ Qlik Sense Cloud: Not supported

Legacy mode: Supported

3. How to Disable Standard Mode?

In order to use the restricted functions and variables again in the Qlik Sense data load script, you need to disable the standard mode hence, enabling the legacy mode. Although, it should always be kept in mind that disabling the standard mode exposes the files to potential risks.

One way to disable the standard mode is through the Qlik Sense QMC. Another way for disabling standard mode in Qlik Sense Desktop, is by setting standard/legacy mode in Settings.ini. The Settings.ini file is located in C:\Users\{user}\Documents\Qlik\Sense\Settings.ini.

To enable the legacy mode, follow the steps given below.

  • Open Settings.ini in a text editor.
  • Change StandardReload=1 to StandardReload=0. Where 1 is for standard mode and 0 is for legacy mode.
  • Save the file and start the Qlik Sense Desktop.

So, this was all in Qlik Sense File System Access Restriction. Hope you liked our explanation.

4. Summary

Hence, in this tutorial, we learned about the Qlik Sense File Access System Restrictions working in the standard mode. We saw which statements, functions, and variables do not support in standard mode and those support in legacy mode. At last, we saw how to disable the standard mode, so you can get rid of the restrictions and enable the legacy mode.

Still, if you have any query related Qlik Sense File System Access Restriction, ask in the comment tab.

Must Read – 

Qlik Sense Interview Questions

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.