Unable to fetch the value from Static Choice and Pass in other topic
Community Alums
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-01-2024 09:52 PM
Hi All,
I need help in one use case in Virtual Agent.
I am giving one static choice to users and I am trying to store the input from that static choice then I need that value in another topic based on which I will define some conditions.
What I did:
After defining choices, I have included one script Action to store the values:
(function execute() {
vaVars.selectedCategory='';
selectedCategory = vaContext.select_topic_related_to_your_problem;
})()
After this, I have defined the topic Switcher, it is switching perfectly, then in other topic I am trying to fetch the value like this:
(function execute() {
if(vaContext.selectedCategory == 'Software and Apps')
return true;
})()
But it is saying undefined. I am attaching the image. Please Guide Thanks
Topic 1:
Topic 1:
Topic 2:
Thanks
Vedant
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-03-2024 07:40 AM
Hi,
Please try using a text step just to print if the value you passed from first topic is even moving to the second one.