Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

How to run parametrized macro in trigger

Hi All,

I have two macro functions. One of them is parametrized.

When I call the non-parametrized function from  'OnPostReload' action as macro everyting seems ok.

But it is not working when I do the same for parametrized macro function.

Macros are like following :

-------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------

function NonParametrized

'do sth script

end function

function Parametrized (param1)

'do sth script

end function

--------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------

'following works in module, but that is not what I need

function NonParametrized

call Parametrized ("testParam1")

'I want to do the same on OnPostReload's Edit Expression as macro (not in edit macro module, outside the macro module)

'do sth script

end function

But when I write it OnPostReload  as Macro Name such as

call Parametrized (param1)

or

Parametrized  param1

It is not working.

Any Idea ?

Regards,

1 Reply
MVP & Luminary
MVP & Luminary

Re: How to run parametrized macro in trigger

You can call a sub but not a function in a macro. You won't get an error if you specificy the function name, but nothing will happen. So you have to call a sub. Use a variable to store your parameter and have the macro use the variable. If you want you can have the sub call the function and pass the value from the variable as parameter to the function.


talk is cheap, supply exceeds demand
Community Browser