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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Declare context variable that references another context variable

Hi
I have a context defined in studio and I'd like to declare a named context variable who's value references ANOTHER context variable
Such as
VAR1 = "http://www.whatever.com/${othercontextvariable}"
Is this possible?

Labels (2)
1 Reply
Anonymous
Not applicable
Author

You can certainly say: -

context.var1 = "index.html";
context.var2 = " http://www.acme.com/" + context.var1;
or you can put it on the Global Map
globalMap.put("VAR2", " http:// acme.com/" + context.var1);
and retrieve it with
((String) globalMap.get("VAR2"));

remembering to null test when referencing these objects