- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2020 05:35 AM
Hello,
I am new here and have little experience with VA's. What I would like to do is the following:
I would like to grab the initial input given by the user of the VA and use this input later as a description in an incident.
The input given here under "Please type your request"
Needs to end up here in the description (topic block used to create an incident). I guess we need to run a script?
I already tried to make use of "vaVars.global_search_text" and "vaSystem.topicDiscovery()" which I found as the answer to this question: https://community.servicenow.com/community?id=community_question&sys_id=2a5e43cbdb58181413b5fb243996....
Unfortunately I have no experience with javascript and the above didn't bring me any further. I hope that what I want is even possible and that some of you can help me. Thank you in advance!!
Solved! Go to Solution.
- Labels:
-
Virtual Agent

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2020 04:02 PM
If the user typed something in, it can be found in vaSystem.getSearchText(). If they selected something from "Show Me Everything" button, that Topic/Intent name can be found with JSON.parse(vaVars._topic_current).name;

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2020 04:02 PM
If the user typed something in, it can be found in vaSystem.getSearchText(). If they selected something from "Show Me Everything" button, that Topic/Intent name can be found with JSON.parse(vaVars._topic_current).name;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2020 07:56 AM
Thank you sbritt! It worked.
We made a script variable and now use this script to get the initial input where we want it.
thanks again!
(function execute() {
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2021 12:31 PM
if im using a short description input at the beginning of the conversation topic where in the setting should we paste vaSystem.getSearchText();
ex: if initial search is empty, show short description, else if initial search has value skip short description question
thank you!