Reports: How could I get the current date as default for an variable?

Avatar

Avatar
Validate 1
Level 1
roberts32477966
Level 1

Likes

0 likes

Total Posts

12 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
roberts32477966
Level 1

Likes

0 likes

Total Posts

12 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile
roberts32477966
Level 1

29-03-2017

Hi,

I would present by default a date range like: start date = today and end date today+2weeks. I tried to set some vaiable and insert some js code into the default field, but it doesn't work! Please find more in the attachement.

report with start and end date.JPG

Variable for report.JPG

Many thanks

robert

Replies

Avatar

Avatar
Validate 1
Employee
Vapsy
Employee

Likes

370 likes

Total Posts

726 posts

Correct reply

342 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Validate 1
Employee
Vapsy
Employee

Likes

370 likes

Total Posts

726 posts

Correct reply

342 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 250
View profile
Vapsy
Employee

29-03-2017

Hi Robert,

One quick way will be to do a preview of your web application and find the id attribute details for both textboxes.

Use JavaScript to calculate current date and the End Date and assign it either using JS or jQuery, whichever is feasible for you.

Regards,

Vipul