workflow javascript code component | Community
Skip to main content
New Participant
February 2, 2018
Solved

workflow javascript code component

  • February 2, 2018
  • 3 replies
  • 3385 views

Hi Team,

Can you please let me know how should i replace <%= new Date().getFullYear() %>. Correct script is <%= "<" + "%= new Date().getFullYear() %" + ">" %> in javascript code workflow.

Regards,

Nidhi

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by naveens49375819

Hi Nidhi,

I am not sure what is your requirement.

If you are calling any js functions within js activity. You can call as like below.

var test = new Date().getFullYear() ;

logInfo(test)

This will show you current year.

Thanks

Naveen S

3 replies

Amit_Kumar
New Participant
February 7, 2018

Hi Nidhi,

it's not clear from the question can you please share the screenshot to support what you want?

Regards,

Amit

naveens49375819
naveens49375819Accepted solution
New Participant
February 5, 2018

Hi Nidhi,

I am not sure what is your requirement.

If you are calling any js functions within js activity. You can call as like below.

var test = new Date().getFullYear() ;

logInfo(test)

This will show you current year.

Thanks

Naveen S

New Participant
February 2, 2018

how to give -  <%= "<" + "%= new Date().getFullYear() %" + ">" %> in a variable in javascript file in workflow .

Please guide me on the same showing error as while parsing XML string when providing as below syntax - vars.searchString='&lt;%= new Date().getFullYear() %>'; in order to replace -  <%= new Date().getFullYear() %>. Correct script is <%= "<" + "%= new Date().getFullYear() %" + ">" %>

Thanks Much in Advance!

Regards,

Nidhi