workflow javascript code component

Avatar

Avatar
Validate 1
Level 2
nidhiv77838491
Level 2

Likes

6 likes

Total Posts

28 posts

Correct reply

1 solution
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 2
nidhiv77838491
Level 2

Likes

6 likes

Total Posts

28 posts

Correct reply

1 solution
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Affirm 1
View profile
nidhiv77838491
Level 2

02-02-2018

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

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Shape 1
Level 2
naveens49375819
Level 2

Likes

4 likes

Total Posts

29 posts

Correct reply

3 solutions
Top badges earned
Shape 1
Give Back 5
Give Back 3
Give Back
Ignite 1
View profile

Avatar
Shape 1
Level 2
naveens49375819
Level 2

Likes

4 likes

Total Posts

29 posts

Correct reply

3 solutions
Top badges earned
Shape 1
Give Back 5
Give Back 3
Give Back
Ignite 1
View profile
naveens49375819
Level 2

05-02-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

Answers (2)

Answers (2)

Avatar

Avatar
Springboard
MVP
Amit_Kumar
MVP

Likes

329 likes

Total Posts

649 posts

Correct reply

231 solutions
Top badges earned
Springboard
Ignite 5
Ignite 3
Ignite 1
Validate 10
View profile

Avatar
Springboard
MVP
Amit_Kumar
MVP

Likes

329 likes

Total Posts

649 posts

Correct reply

231 solutions
Top badges earned
Springboard
Ignite 5
Ignite 3
Ignite 1
Validate 10
View profile
Amit_Kumar
MVP

07-02-2018

Hi Nidhi,

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

Regards,

Amit

Avatar

Avatar
Validate 1
Level 2
nidhiv77838491
Level 2

Likes

6 likes

Total Posts

28 posts

Correct reply

1 solution
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 2
nidhiv77838491
Level 2

Likes

6 likes

Total Posts

28 posts

Correct reply

1 solution
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Affirm 1
View profile
nidhiv77838491
Level 2

02-02-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