The CreatorCon Call for Content is officially open! Get started here.

Virtual Agent how to use scripted date/time

Mark Roethof
Tera Patron
Tera Patron

Hi there,

Upon using the Action Utility within the Virtual Agent, I'm encountering an issue with scripted date/time. On the Utility, I've scripted the value of a field as 'javascript: new GlideDate()'. This looks oke (picture 2). Though if I look at the generated record, all values have been created fine except for the date/time of visit?!
I also tested with a hardcoded date/time (on Time checked in), that does work fine.

Any ideas? 

Kind regards,
Mark

find_real_file.png

find_real_file.png

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

1 ACCEPTED SOLUTION

Mark Roethof
Tera Patron
Tera Patron

Hi addressed this as an issue and opened a Problem for this: PRB1328900.

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

View solution in original post

4 REPLIES 4

Barbara L - Gli
Tera Guru

Hi,

Have you tried using 'javascript: new GlideDateTime()' instead? It may not be populating because it's only a date populating a date AND time field.

Hope this helps!

Mark Roethof
Tera Patron
Tera Patron

Hi Barbara,

Thanks for the response.
Did try, no luck, unfortunately. Also tried with a Script Action, that does work. Tried both situations also on Madrid, no difference.

Feels like a bug. I will report this thru Hi. A bug because visually you do see the data on picture 2, though it's not being saved.

Kind regards,
Mark

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

Mark Roethof
Tera Patron
Tera Patron

Hi addressed this as an issue and opened a Problem for this: PRB1328900.

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

Ash44
Tera Contributor

Hi Mark,

Stumbled across this same issue.

It seems however if you are able to set the value for time you need in a script variable then it is able to set the time value in the record action.

find_real_file.png