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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Unable to send mail for file not exists

Hi Guys

I am new to Talend.Please help me out to solve my issue

I have multiple files in FTP server(xlsx).

Now i need to send a mail if file not exists. if file is present i need to run my job.

 

i used two if conditions, but that is working in opposite direction

xlsx file exists(FTP)- it is sending mail

csv file not exists(FTP) - it is sending mail.

 

tftpfileexist_1 ----if (order:1)   !((Boolean)globalMap.get("tFTPFileExist_1_EXISTS"))  --sendmail

tftpfileexist_1 ----if (order:2)  ((Boolean)globalMap.get("tFTPFileExist_1_EXISTS"))  ---job has to run

 

Labels (3)
1 Solution

Accepted Solutions
manodwhb
Champion II
Champion II

@Lakshmi2411,still do you have issue?

View solution in original post

9 Replies
manodwhb
Champion II
Champion II

@Lakshmi2411,i have tested below one is working as expected.use below way.

((Boolean)globalMap.get("tFileExist_1_EXISTS"))==true

((Boolean)globalMap.get("tFileExist_1_EXISTS"))==false

0683p000009Lwno.png

 0683p000009LxF6.png

manodwhb
Champion II
Champion II

@Lakshmi2411,still are you facing the issue?

Anonymous
Not applicable
Author

Hi
Plese help me out.
Even Though file exists is is send mail..
Here I am using File list,so that it can retrieve multiple files with xlsx exists or not .

 

 


MultipleFileslist.PNG
manodwhb
Champion II
Champion II

@Lakshmi2411,since you can use tFilelist,but you need to iterate the flow.check the below way.

0683p000009Lxfw.png

Anonymous
Not applicable
Author

-Finaally i have to achieve if files with xlsx it has run the job
if files are not present with xlsx it has send mail.
-can't we achieve my scenario with this condition.
-((Integer)globalMap.get("tFTPFileList_1_NB_FILE"))==0
manodwhb
Champion II
Champion II

@Lakshmi2411,

 

you can do  the below way that 

((Boolean)globalMap.get("tFileExist_1_EXISTS"))==true && ((Integer)globalMap.get("tFTPFileList_1_NB_FILE"))>0

 

 

 

 

0683p000009LxH6.png

manodwhb
Champion II
Champion II

@Lakshmi2411,still do you have issue?

Anonymous
Not applicable
Author

Got it.Tnks.

I wrote  ((Integer)globalMap.get("tFileList_1_NB_FILE"))<0

it got worked.

 

manodwhb
Champion II
Champion II

@Lakshmi2411,you were wellcome.Please provide Kudos also.