How to submit custom record producer from virtual agent ?

Omkar Ranjane
Tera Guru

I have one customer record producer with variables as Requested for(reference), category(select box), subcategory (select box), item( select box), short desc(single line text), desc (html) .

I want to create topic "Create incident",  after clicking on this topic it should show 4 categories form category, then ask for subcategory but it should show the all the values form that subcategory variable. same goes for item also.

item is dependent on subcategory and subcategory is dependent on category.

How to achive this ?

1 ACCEPTED SOLUTION

Mark Roethof
Tera Patron
Tera Patron

Hi there,

"item is dependent on subcategory and subcategory is dependent on category."

Sounds like this should help you:

2021-01-18 Virtual Agent Topic Block: Retrieve Choice List (Share ❒)

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark
2020, 2021 ServiceNow Community MVP
2020, 2021 ServiceNow Developer MVP

---

LinkedIn
Community article, blog, video list

 

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

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

so dependent information should be shown on that topic.

So what have you tried so far?

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Omkar Ranjane
Tera Guru

I have write this code but it is showing all the values.

I want to show only 4-5 values out of them which is shows on portal.

 var choices = new GlideChoiceList();
  
    var choiceList = choices.getChoiceList('incident', 'category');
    
    var options = [];

    for (var i=0; i < choiceList.getSize(); i++) {
        options.push({'value': choiceList.getChoice(i).getValue(), 'label': choiceList.getChoice(i).getLabel()});
    }
    
    return options;    

Mark Roethof
Tera Patron
Tera Patron

Hi there,

"item is dependent on subcategory and subcategory is dependent on category."

Sounds like this should help you:

2021-01-18 Virtual Agent Topic Block: Retrieve Choice List (Share ❒)

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark
2020, 2021 ServiceNow Community MVP
2020, 2021 ServiceNow Developer MVP

---

LinkedIn
Community article, blog, video list

 

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 there,

Any follow-up needed? Or was my answer sufficient?
Let me know.

If your question is solved, please close the topic by marking my answer as correct. This will help others searching for a similar question and will remove the topic from the unsolved list.

Kind regards,
Mark
2020, 2021 ServiceNow Community MVP
2020, 2021 ServiceNow Developer MVP

---

LinkedIn
Community article, blog, video list

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

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

LinkedIn