Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Adding a function (Macro)

I have this problem. I am not able to add a simple function in qlikview.

(sumxx is a sample function).

I write the function ( you see the file function_1.jpg )

I put the function like expression ( you see the file function_2.jpg )

But the function doesn't work ( you see the file function_3.jpg )

Have you had a similar problem ? Why doesn't it work ?

10 Replies
Not applicable
Author

function_2.jpg

Not applicable
Author

function_3.jpg

Miguel_Angel_Baeyens

Hello,

Functions may be called from script, or triggered by actions, but they will not work in expressions.

Anyway, you can create a new button that calls to that macro and finally returns a value in a variable or something like that. Then in your expression you display that variable.

Hope that helps.

Not applicable
Author

I wish to thank of your email, but I have other doubts now :

a) What is meaning called from "script" or "triggered by actions" ?

b) How can I create a new button ? Can you show a picture in jpg ?

Miguel_Angel_Baeyens

Hello,


futurebi wrote:a) What is meaning called from "script" or "triggered by actions" ?


Script is the part where you load your data pulled from your database. Some objects (buttons, charts, variables...) may have actions related to them or actions done over them. These can be checked in the Settings menu, Document Properties, Triggers. A button or a text object, for example, in their properties have an Action tab, where some of these native functions can be triggered.


futurebi wrote:b) How can I create a new button ? Can you show a picture in jpg ?


Just go to any empty space in your sheet, right click and select New Object, Button.

Hope that helps.

Not applicable
Author

Hi futurebi

You can not call macro from expression directly.

BUT you can do this:

1 set 2 varibles in qlikview

2 in sheet property , set a triger to call the macro when sheet is active

3 you should transfer varibles through a qlikview varible and update it use getValue & updateValue function in macro.

Not applicable
Author

I wish to thank wormecota, but I don't know how to do it.

I have setted two variables. But I am not able to set a trigger and I don't know how to transfer variables. Can you show a screenshot (image jpg) ?

pljsoftware
Creator III
Creator III

Hello Sara,

if you like you can write in italian on KILQ Italia we can help you.

Ciao
Luca

Not applicable
Author

Hello Luca

"if you like you can write in italian on KILQ Italia we can help you." I prefer to place on English KILQ, because KILQ Italia there are not much people.

Luca, Could you help on English ? % if you wish, you can write also in Italian.

Thanks.