Catalog Value to be passed to a UI Page for dynamic KB lookups?

Janel2
Mega Expert

I just took ownership of the Service Catalog and I'm not entirely sure what I just walked into.     Forgive my utter newness and I hope there is a much easier way to do this that I've just overlooked.

 

What we have:

We have an "Ask a Question" category (record producer I assume) on our catalog that was intended for generic ServiceNow help.   Nothing fancy at all.AAQ Current.png(I would caption this image as "Basic form is basic").

 

What we're facing is that too many people are using it to try and open incidents, or the check status of a a request, or get a password reset, etc.   A lot of hand holding noise basically.   And judging by the layout and lack of, well, anything, I can see why.

 

What I want to do:

Basically a user picks a question from a select box and the knowledge is displayed on the catalog form instead of opening a new window or linking elsewhere.

I kind of figured out how to do that using a UI Page with iframes, but it is extremely inefficient and I've only been able to figure it out for 1 item (question) at a time.   I think having a bajillion different UI Pages just to display a knowledge article is a little out of the question.  

 

This is what I have so far:

Select Box - "question_types" - holds the questions available for the user

UI Page - "kb_Install" (just a random name I picked) - The UI Page variable placeholder that pulls the UI Page to be displayed.

The "answers" are "hidden" using a Catalog UI Policy.

AAQ WorkingOnIt.png

 

 

What I'm really stuck on:

I believe the best course of action would be to have the Select Box Values set as the appropriate KB Numbers and just pass that over to the UI Page.   What I'm totally stuck on is how the heck to even do that?!

How do I pass the Select Box Value as a variable to the UI Page and have the UI page even use/know what to do with that number?   Is this even possible?

AAQBlah.png(it seems like it should be simple enough)

 

 

This is what I have in my HTML for the KB View UI Page:

 

All I should need to do is that that KB# and have it be replaced by the KB number from my select box.

 

Is there an easier way to do this I'm not aware of?

1 REPLY 1

Janel2
Mega Expert

For some reason I can't insert my UI Page code in my original post.   So here it is:


<?xml version="1.0" encoding="utf-8" ?>


<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">


<div style="overflow: hidden;">


<iframe height="1280px" width="800px" src="/kb_view.do?sysparm_article=KB0013793">.</iframe>


</div>


</j:jelly>