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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

TalendDate.getCurrentDate() with in Expression builder returning same date throughout the Route execution

Hi,

 

I am using this below expression in the cSetBody. 

Language: SIMPLE

Expression: "This messaged is generated in a Route at :" + TalendDate.getCurrentDate()

 

The issue is, In each message I am getting the same datetime even though messages are parted by 1 min. How can I get the current time on each message body? 

I tried using the Numeric.sequence("MessageCount", 1,1) in the expression builder. that is also always returning 1 every time a new message is generated. why is that?

 

Thanks,

Sowjanya.

 

Labels (1)
  • Other

2 Replies
Anonymous
Not applicable
Author

Hi,


@sowjanya wrote:

Hi,

 

I am using this below expression in the cSetBody. 

Language: SIMPLE

Expression: "This messaged is generated in a Route at :" + TalendDate.getCurrentDate()

 

The issue is, In each message I am getting the same datetime even though messages are parted by 1 min. How can I get the current time on each message body? 

I tried using the Numeric.sequence("MessageCount", 1,1) in the expression builder. that is also always returning 1 every time a new message is generated. why is that?

 

Thanks,

Sowjanya.

 


What does your expected result look like? Could you please set an example for us?

Best regards

Sabrina

 

Anonymous
Not applicable
Author

My expectation is to log the below messages, given that the route started at 15:03:55 and cTimer is set to generate messages with a delay of 1 min. 

 

> "This messaged is generated in a Route at : Wed Oct 11 15:03:55 PDT 2017"

> "This messaged is generated in a Route at : Wed Oct 11 15:04:55 PDT 2017"

> "This messaged is generated in a Route at : Wed Oct 11 15:05:55 PDT 2017"

> "This messaged is generated in a Route at : Wed Oct 11 15:06:55 PDT 2017"

> "This messaged is generated in a Route at : Wed Oct 11 15:07:55 PDT 2017" ....and so on. 

 

Issue is that it prints the same time even for a message generated  30 mins after the route has started. 

> "This messaged is generated in a Route at : Wed Oct 11 15:03:55 PDT 2017"

 

thanks,

Sowjanya.