Issue in selecting the output from dynamic choices
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-07-2024 10:43 PM
Hi All,
I am facing issue with one thing. In Virtual Agent I am using Dynamic Choice Input. Where I am writing this code to print choices, so Choices are printing successfully, but when the user is selecting any choices from it, then technical issue is coming.
one more thing, at the place of topicSysId if we give any hardcoded sysid it is working fine.
In logs I checked selectedCategory is showing as undefined but it is defined in some other topics where I am giving values to selectedCategory, so why I will define here.
Kindly Guide
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-07-2024 11:13 PM
from that property you are parsing and then using the value
the issue is because of the variable selectedCategory
is your script depending on some previous input which user gave or you simply want to get value from system property?
what does that property hold? share screenshot.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-07-2024 11:30 PM
Hi @Ankur Bawiskar
Thanks for the reply.
My Scripts depends on the previous value which is already stored in the variable selectedCategory.
In selectedCategory I will get the input from user let's say ""Hardware" which is defined in other topic through which this topic is linked.
And then I am using this value to check that it is present in system property and if yes then I am fetching the corresponding value. This is the screenshot of property:
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-07-2024 11:39 PM
so that variable should store the value so that your script runs fine.
ensure you have access to this variable from other topic.
Please check how you can share data between topics in VA
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-07-2024 11:48 PM
Can you help in it, because I have defined it in previous topic as vaVars. And if I am printing it's value also then it is printing correctly.