Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] Read a component comment or subjob title in another component

Hi All,
Does anybody have an idea how to read a component __COMMENT__ variable or subjob title in another component? It would be very useful. I tried everything and searched everywhere but no luck so far.
Thanks
Labels (2)
6 Replies
Anonymous
Not applicable
Author

Hi,
Does anybody have an idea how to read a component __COMMENT__ variable or subjob title in another component? It would be very useful. I tried everything and searched everywhere but no luck so far.

Are you looking for component's global variable? Could you please elaborate your case with an example?( component __COMMENT__ variable, subjob title)

Best regards
Sabrina
Anonymous
Not applicable
Author

Hi Sabrina,
Every component has a comment field in the settings (Component -> Documentation) with the __COMMENT__ variable attached to it (picture1). The same variable can be used as the component's label (picture2).  I don't know if it is a global variable but I can't see it anywhere in the code and I don't know how to read it in the flow. I would like to use it to insert to a database field.

0683p000009MEb8.jpg
0683p000009MEnX.jpg
Optionally every subjob has a 'title' as a basic setting (picture3). I could use it as well but don't know how to get it. 

0683p000009MEnc.jpg
Anonymous
Not applicable
Author

hi all,
If I've dot a weel-understanding of your purpose, you cannot retrieve the value of __COMMENT__ variable in another job.
you have to store in a globalMap (or anything else) and pass value through context parameter of a tRunJob.
ps: perhaps you can create a context group 'label' with key/value as label/message, but could become hard to manage ...
regards
laurent
Anonymous
Not applicable
Author

That's what I want to do... store it in globalMap/context... whatever and use it. I just don't know how to call this variable to load it to globalMap/context, what is the command to call it?
Anonymous
Not applicable
Author

Anonymous
Not applicable
Author

Thanks for all the answers...
I've found the answer to my question in another posts. As I thought what I wanted to do cannot be done. 
The hover notes in a component properties are mainly for component development. The variables exist in the JET code inside the component and they are not exposed to the job code.
Which means I cannot access the __COMMENT__ component variable I wanted to use.