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: 
linusblomberg
Creator II
Creator II

Comment or tag variable in load script

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

4 Replies
marcus_sommer

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

linusblomberg
Creator II
Creator II
Author

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

marcus_sommer

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

Gabriel
Partner - Specialist III
Partner - Specialist III

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

;