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: 
JimmyM
Contributor
Contributor

Passing Connection Mode to tFTPGet tFTPPut via context or variable

I'm need to be able to set the FTP Connection mode in a context so that after a job is exported, I can change the connection mode (PASV or ACTV) without editing the job and re-exporting.
Is this possible?
I'm using TIS 4.0.3
Labels (2)
1 Reply
Anonymous
Not applicable

Hi
It is impossible to set the connection mode with context variables now, it is a list type, we must select one of them at the job design time! However, there is a work around to fit the request, that is to create two different sub jobs and fires them base on a context variable, for example:
tJava--runIf--tRunJob_1
--runIf--tRunJob_2
on tJava:
if(context.connectionMode.equals("active")){
globalMap.get("active",true);
}else{
globalMap.get("active",false);
}
on the first runIf, set the condition as:
(Boolean)globalMap.get("active")
on the second runIf, set the condition as:
!(Boolean)globalMap.get("active")
in the first child job, use a tFTPConnection to create a ftp connection with 'Active mode'
in the seond child job, use a tFTPConnection to create a ftp connection with 'Passive mode'

So now, you are able to change the value of context variable and execute the job script with specified value.
Best regards
Shong