Personally I avoid macros, the reasons are explained in this Blog Post Macros are Bad
Notwithstanding that, what are you trying to achieve with this macro ?
It may be achievable without resorting to a macro.
I am also agree with you and this macros are time consuming also.
@qv_mypath You can do this with normal tables also with the inline data i represent a small demo to you to explain how to do this calculation with the tables.
//Calculation Done on the Variable
Let vTest = 3 + 3;
//Variable calculation taken on the table
Load * Inline
You can do any calculation on the script part.
Thank you for your response, Bill!
I asked this more to learn about the general possibility (to define any function in macro module and to assign its output to any variable - preferably in UI but at least in the load script). The certain goal can surely be achieved without macro :-)
That said, I am agree that the macros are somewhat less than perfect. But sometimes you need a user-defined function. The best example I can think of at the moment is borrowing functions for regex processing from vbs since you do not have them in the load script out of the box.
You need to add () after the function name
function test ()
test = 3 + 3
And set the variable in your load script thus, not forgetting the (), I also put a trace after it to display what is in the variable.
let vTestVar = test() ;
trace vTestVar: $(vTestVar) ;
Sample qvw is attached.
240382.qvw 142.0 K