- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2020 09:50 PM
Hi ALL,
I have a variable with Date Type and I want the variable to auto populate current date. I used onChange client script with below script but no date populated. Could you please help with a script to achieve this requirement. Thank you.
var dFormat = g_user_date_format;
var tdayDate = formatDate(new Date(),dFormat);
g_form.setValue('todayDate', tdayDate);
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2020 09:55 PM
Hey Rich,
Go to variable dictionary (right click on the variable) and in default value write this: javascript:gs.nowDateTime()
If it works the please mark my answer Correct and Helpful.
Thanks and Regards:
Utpal Dutta

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2020 10:11 PM
Put this in Default Value of the variable:
javascript:gs.nowDateTime()