Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
warfollowmy_ver
Creator III
Creator III

Vbs functions in expressions (Web)

I can use functions in my expressions that I wrote myself in vbs.

More on the link https://community.qlik.com/t5/QlikView-Documents/StrCmp-Function/ta-p/1477443.

But they do not work in the web client.

Is it possible for this to work in a web client?

Labels (1)
1 Solution

Accepted Solutions
marcus_sommer

The logic works in general also on the server and within the AJAX client. To get it working you need to enable the macro-options within the qmc in tab security and also adding the following within the servers settings.ini:

AllowMacroFunctionsInExpressions=1

AllowMacroFunctionsInExpressions.JPG

Like jontydkpi stated there might be some restrictions respectively security risks to the kind of macro if there are any filesystem-access or similar measures included - and it will be executed with the user who runs the server services and not with the user who accessed the application per AJAX.

If anyhow possible this easter egg exception should be avoided and quite many calculations could replaced with native Qlik expressions and/or variables with parameter like stated in the link from your origin question.

- Marcus

View solution in original post

3 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Depends on the vbscript and the system setup. Certain functions, such as manipulating the Qlik sheet and objects (and others inside the sandbox) can work fine if server  scripts are enabled in QMC.

Vbscript that needs access to the file system or other system resources needs to be enabled separately in QMC (and is not enabled by default and not recommended). The Qlik service account will also need access to whatever resources are required. 

Some triggers available in desktop are not available in the web client.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
warfollowmy_ver
Creator III
Creator III
Author

Function ABCDE (p1, p2)

       ABCDE  = p1 + p2

End Function

 

Desktop:

Create TextBox   >>>

Expression = '= ABCDE (1, 3)'   >>>

Value of TextBox = 4.

 

Web:

Message about error.

 

I do not appeal to hard drives, do not open a copy of Excel and so on. This is an elementary function.
Is there a way to make this function work in Web ajax? What needs to be done for this?

 

marcus_sommer

The logic works in general also on the server and within the AJAX client. To get it working you need to enable the macro-options within the qmc in tab security and also adding the following within the servers settings.ini:

AllowMacroFunctionsInExpressions=1

AllowMacroFunctionsInExpressions.JPG

Like jontydkpi stated there might be some restrictions respectively security risks to the kind of macro if there are any filesystem-access or similar measures included - and it will be executed with the user who runs the server services and not with the user who accessed the application per AJAX.

If anyhow possible this easter egg exception should be avoided and quite many calculations could replaced with native Qlik expressions and/or variables with parameter like stated in the link from your origin question.

- Marcus