Update UI Page content based on Choice list selection
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-16-2016 09:33 AM
I hope I'm asking a simple question that is easy to answer.
I am making a dashboard of table data in a UI Page. At the very top of the page there will be a dynamic choice list. Based on it's selection, I will need to update all of the pages data.
The Choice List value contains the sys_id. I thought that I could just call an onChange event and update the GlideRecord to re-pull the data, but I cannot seem to figure this out.
Currently, the data is just being displayed from the Glide Record in variables. The page is currently not a "form."
Any suggestions?
Note: I know enough about Jelly Scripting to be dangerous.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-16-2016 03:06 PM
I'm not sure if I am understanding what you want - you have a custom UI page and it contains a field that you want the user to change, and when the user changes that field, something on the UI page changes?
I am sure there are many ways to handle this, however here it snapshot of what we do in one of ours. The summary is:
- We have a dropdown box (line 19) that contains a bunch of values we extract out of ServiceNow. When the user selects a value, the onchange for that select box is called, in this case it calls the function Edit_QM. Edit_QM takes in the value from the select box and does a lookup in ServiceNow based on it, putting the text into a field on the form.
Does this point you in the right direction or is it stuff you already know? If so, let me know what the next step is and I can (or I am sure someone else can) give you a hand. It's just without this basic step of getting a UI Page to function with the onchange, the rest is pretty pointless.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-16-2016 05:39 PM
I ended up writing the the sys_id of their selection into a temp table and then refreshing the page, then querying to get the stored sys_id. I'm sure it's not the most efficient way, but until the time crunch I was under, it worked. I will certainly check out your example!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-16-2016 06:59 PM
Not sure I am following your requirement but it sounds like you want a dashboard with reports based on a selection. I posted something on Share that may solve your requirement: