Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, Does anyone know if it is possible to Comment or tag variables created in the loadscript?
Comment or tag seem to only work on fields and tables.
If I look at the xml of a qvw variables can have comment so it should be possible to create these in the load script when the variable is declared right?
I'm not talking about // or /* */
Thanks for reading my post.
//Linus
I believe the only way would be to do it per macro, maybe in a loop through a table or another variable:
here a simple example from apiguide.qvw:
set v = ActiveDocument.Variables("Variable1")
v.SetComment "The currency rate"
- Marcus
Hmm not really what I was hoping for. I have a variable repository which creates a number of qvs-files that I include in my apps. I'm hoping to create the comment in the qvs file so when I read the xml of all apps I can visualize what repository they are from. Maybe I can make it work in a macro. I will give it a try.
Thanks for your help Marcus
Maybe you used your variable repository as independent table (maybe in a hidden sheet) as possibility to have access to these meta-data and by using from inputboxes you could put the comments into the variable-label and you could use a mouse-over.
label:
= varName & chr(10) & chr(10) & only({< varNameField = {'varName'}>} varComment)
- Marcus
Hi,
I think if you want to achieve tagging or commenting variable in the script, you can store the variable in say Excel file. Effectively having any number of columns which will include comment and load them as either
Variable_Table_Name:
LOAD
Variable AS %Variable
Comments AS %Comment
FROM
$(SourceFile)
;
Or use Must_Include to load the file as part of your script
;