Autopopulate user name and current date using client scripts

User267
Tera Contributor

How to autopopulate user name and current date in catalogue form service now.

2 REPLIES 2

Elijah Aromola
Mega Sage

You can set default values for both of the variables. Without testing the date one, I am not sure if the format works with the date catalog variable.

// Username
javascript:gs.getUserID(); 

// Date
javascript:new GlideDateTime().getDate()

 

DanielCordick
Mega Patron
Mega Patron

for userID use Javascript: gs.getUserID()

for time use Javascript: gs.nowDateTime()

 

you should put these into the default value of the variable