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

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
root
Creator II
Creator II

Design Component name

I have a few tJava components added. They are added with name tJava_1... tJava_n

 

I have renamed and given them a custom name so its easy for me debug.

 

I know there is a "currentComponent" variable which allows me to reference this object. Is there anything available which would allow me to reference the custom name of that component? 

 

Thanks.

Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable

It is not a custom name it is an alias. If you look at the underlying code, a component called tJava_1 will always be tJava_1 even if it is given an alias. You will always need to refer to the name.

View solution in original post

4 Replies
nfz11
Creator III
Creator III

You can access the "custom name" or label, of any component like:

 

(String)globalMap.get("componentName__LABEL__");
// e.g., for tJava_1:
(String)globalMap.get("tJava_1__LABEL__");

I am not sure what you mean by the "current" component.  If you mean the component that is being executed currently in the flow, I am not sure how you would get that.

 

root
Creator II
Creator II
Author

@nfz11 Unfortunately, this did not work for me. Do you have any working example you can share? Maybe I am missing something. 

 

Thanks!

nfz11
Creator III
Creator III

I apologize, the example I gave will not work as the __LABEL__ value is not exported to the globalMap.  I don't think there is a way to get that value in a Talend job.

Anonymous
Not applicable

It is not a custom name it is an alias. If you look at the underlying code, a component called tJava_1 will always be tJava_1 even if it is given an alias. You will always need to refer to the name.