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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to get the current active context name ?

Hi guys,
I need to make a distinction depending on the active context.
In "Default" i need to run a special job whereas in "Production" and "Test" context i don't have to.
Is there a way to deal with that, a way to retrieve the current or active context name ?
Thanks in advance,
Labels (2)
3 Replies
c0utta
Creator
Creator

Hi gavelin,
In Java, try contextStr.equals("Default").
Cheers,
c0utta
Anonymous
Not applicable
Author

Hello
Is there a way to deal with that, a way to retrieve the current or active context name ?

Yes, there is a variable store the currnet context name
System.out.println(contextStr);

Best regards

shong
Anonymous
Not applicable
Author

Does anyone know how to access contextStr in e.g. the properties for a component such as tFileCopy?