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

Setting Boolean UI fields with context variables - HOW-TO

Hi there;
In most components we can set the value of a field by using context variables. So for example in a DB component we can replace  host "myhost" by host context.myHost after having set the myHost environment variable. This works great.

My issue is with the tFileCopy component. There is a series of "check mark" (Boolean" fields in the component UI. One specific one "Remove Source File". This effectively change a copy behavior to a move.
I want to change the value of this "Remove Source File" Boolean check mark but at run time based on my environment variable which tells me I'm in Prod or Dev.
Basically I want something like this
if (context.Environment == "Prod") then set "Remove Source File" to true
So my question is how to I access those Boolean type variables in the UI?

Labels (2)
2 Replies
Anonymous
Not applicable
Author

Hi,
Have you tried to use "Run If" trigger in your job design and s et condition as:
 if (context.Environment == "Prod") then trigger tfilecopy with " Remove Source File " option.
  if (context.Environment == "Dev") then triiger tfilecopy_2 without  " Remove Source File " option?
Best regards
Sabrina
Anonymous
Not applicable
Author

Thank you. not very elegant but functional. It would work.