Virtual Agent Decision box not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2023 05:58 AM
Hi All,
I have a requirement where I have to show outages on the Virtual agent greeting message:
There's a checkbox field(u_portal_outages) in Core_Company table if checked then the outages from this company can be seen in portal.
I have to check the company of the login user and if the company of logged in user have this field as checked then I have to proceed further to glide the outage table to fetch more details about the outage.
Now I am not able to check this field if it's true or not in my virtual agent topic somehow.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2023 06:07 AM - edited 07-12-2023 06:08 AM
Hi there,
Where are you using this script? In a Script Action? Or is this the script on both the transitions from the decision?
Did you also debug if this gives the values you would expect?
vaInputs.check_company_of_logged_in_user
Kind regards,
Mark
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2023 06:10 AM
In Script Action.
Not really sure how to achieve it

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2023 06:43 AM
So how do the transitions look like?
Kind regards,
Mark
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2023 06:59 AM
the compiler always go to Either true or either false depending upon the changes I make in the scripts. It's not dynamic