Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Actions: How to run macro with Parameters?

I've a simple question :

I've a macro which use a string in parameter :


sub mymacro (message)
...
end sub

how to call it with an action ?
I mean there is an action / External / Run Macro. It works with macro without parameter (i write only the macro name). But I'm fighting to find the syntax to add a string parameter in this macro launch (for example to launch mymacro("my string parameter") with action).

Best regards

P.S : I'm working with V9 SR4

2 Replies
jerrysvensson
Partner - Specialist II
Partner - Specialist II

You can't.

The only solution is to wrap it.

Sub CallMacroParamOne

     call mymacro ParamOne

end sub

Sub mymacro(ParamOne)

     ...

end sub

Or use variables?

fkeuroglian
Partner - Master
Partner - Master

You can call some macro without param that call the macro with param

do you understand?

example:

Action/Run Macro/ myMacro

in the edit module:

sub myMacro

     set param1=...

     set param2=...

     call myMacroParam(param1,param2)

end sub

hope help!

Fernando