Five Stars

[resolved] Use if from tFileCompare to only send mail if boolean is false

Hi
I have a routine which uses a tMySQLInput to tFileOutputDelimited to tFileCompare.
I am using the tFileCompare to check the file produced against the one produced yesterday. I then only want to send an email if the file is different.
So i used an IF trigger to a tsendmail. But i can't get the IF to work.
I'm not very good at Java, so i tried using the (Boolean)globalMap.get("tFileCompare_1_DIFFERENCE") parameter - but i couldn't get it to send anything.
Can anyone help?
1 ACCEPTED SOLUTION

Accepted Solutions
One Star xto
One Star

Re: [resolved] Use if from tFileCompare to only send mail if boolean is false

Hi
Maybe it sounds wierd but the ((Boolean)globalMap.get("tFileCompare_1_DIFFERENCE")) returns:
- true - if files are the same
- false - if file are different
at least in ver.5.4.1. So use 
!((Boolean)globalMap.get("tFileCompare_1_DIFFERENCE"))

in your IF link, if you want to send mail when files are different
2 REPLIES
One Star xto
One Star

Re: [resolved] Use if from tFileCompare to only send mail if boolean is false

Hi
Maybe it sounds wierd but the ((Boolean)globalMap.get("tFileCompare_1_DIFFERENCE")) returns:
- true - if files are the same
- false - if file are different
at least in ver.5.4.1. So use 
!((Boolean)globalMap.get("tFileCompare_1_DIFFERENCE"))

in your IF link, if you want to send mail when files are different
Five Stars

Re: [resolved] Use if from tFileCompare to only send mail if boolean is false

@ xto
Many thanks - worked a charm :-)