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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
i3ill_W
Contributor
Contributor

Prompt with Default of Today's Date

Hi,

I'm just learning Talend - using Open Studio (Integration) v7.3.1. I've come from a Data-Stage background. Have to say I'm very impressed so far with Talend - just a couple of sticking points ...

Is there a way to prompt for, say, a file name - but have the prompt default to a date (eg today's date) as a part of that filename (eg Filename_2021_06_15.csv).

I've tried context variables - with prompts - and I've tried to pre-populate them using tJava component or with the tContextLoad component - but I'm not achieving the desired result.

I've done a lot of Googling and searching in forums etc but nothing seems to address this - I would've thought this was a fairly common request.

Any ideas would be appreciated.

Cheers ... Bill

Labels (2)
2 Replies
Anonymous
Not applicable

To set the filename like Filename_2021_06_15.csv, you can use the expression on tJava as below:

"Filename_"+TalendDate.formatDate("yyyy_MM-dd", TalendDate.getCurrentDate())+".csv"

 

Regards

Shong

i3ill_W
Contributor
Contributor
Author

Thanks Shong - I managed to get a job working with this.

 

I can't get it to populate a prompt with todays date - which the user could then override (at runtime) with a different date, to run a job for a different day ... but with a bit of re-organising of my process, I can make this work (minus the prompting, of course).

 

Cheers ... Bill