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: 
Anonymous
Not applicable

Send file with dynamic file name though tSendmail

Hi,

 

Can someone advise me below? Thank you so much!

I am trying to use tSendmail component to send file with current date. I put below in tsendmail file attachment - 

"C:/Users/....../E106_Error_report_"+TalendDate.formatDate("yyyyMMddHHmmss",TalendDate.getCurrentDate())+".US.DWLOGN"

and I got below error - 

0683p000009Ly2v.png

Labels (2)
1 Solution

Accepted Solutions
TRF
Champion II
Champion II

Regarding the job design, it should looks like this to be clearer:

0683p000009Lxpa.png

Now, why it doesn't work, this is the question.

In your 1rst post you said you use TalendDate.formatDate("yyyyMMddHHmmss",TalendDate.getCurrentDate()) to construct the filename in tSendMail.

As "ss" changes every second (!!!) you probably have a different filename between tFileOutputDelimited and tSendMail.

To avoid this kind of mistake, I suggest you to use a global or context variable to define the filename and filepath.

 

View solution in original post

6 Replies
TRF
Champion II
Champion II

Are you sure the file exists before you try to send it? Can you share your job design?
Anonymous
Not applicable
Author

Hi,

 

Please see below. I successfully run the report but not good through tsendmail component

0683p000009Ly35.png

Anonymous
Not applicable
Author

The E106_US is the file you are attempting to send via email correct? IF so. Connect the tsendmail to the E106_US file Use a OnSub or ONComp to connect. 

TRF
Champion II
Champion II

Regarding the job design, it should looks like this to be clearer:

0683p000009Lxpa.png

Now, why it doesn't work, this is the question.

In your 1rst post you said you use TalendDate.formatDate("yyyyMMddHHmmss",TalendDate.getCurrentDate()) to construct the filename in tSendMail.

As "ss" changes every second (!!!) you probably have a different filename between tFileOutputDelimited and tSendMail.

To avoid this kind of mistake, I suggest you to use a global or context variable to define the filename and filepath.

 

Anonymous
Not applicable
Author

Thanks! Your advice is very helpful! - after I delete "ss" and tsendmail worked.

I am also learning on creating global variable/context variable. Can you please educate me what global variable means? can't find explanation and not know how to do