Get Values from UI Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2016 12:20 AM
This is my UI Page.
var json = new Packages.org.json.JSONArray();
while (jelly.jvar_diag.nextNode()) {
var diagNode = jelly.jvar_diag.getNode();
var jsonNode = new Packages.org.json.JSONObject();
jsonNode.put("name", diagNode.name);
var vals = new Packages.org.json.JSONArray();
jsonNode.put("values", vals);
addValueToJSON(vals, "Statistics For", diagNode.stats['instance_name']);
addValueToJSON(vals, "Build Name", diagNode.stats['glide.build.name']);
addValueToJSON(vals, "Build Date", diagNode.stats['glide.build.date']);
I need to get the value for Statics for and insert it in an another table.I am able to insert the record but the value is not coming as expected it is undefined.
Anyhelp would be appreciated
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2016 03:03 AM
Thank you for your clarification.
If it is an XML field, why are you trying to parse JSON. Am I missing something? Try using XMLDocument to walk your XML file.
XMLDocument Script Object - ServiceNow Wiki