- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2016 01:20 PM
Hello All,
I am using g_form.getValue to develop an UI policy in Change Management.
This is the simple code that i used to display form variable "Configuration Item". The actual field name is cmdb_ci
var ci_name = g_form.getValue('cmdb_ci');
g_form.showFieldMsg('cmdb_ci',ci_name,'error');
Why is it displaying a lengthy reference value? How can i convert the reference value to just display as "denj******"?
Any help is greatly appreciated. Thanks.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
-
Team Development

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2016 01:27 PM
Hi Varun,
Here you go.
var ci_name = g_form.getDisplayBox('cmdb_ci').value;
g_form.showFieldMsg('cmdb_ci',ci_name,'error');

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2016 01:27 PM
Hi Varun,
Here you go.
var ci_name = g_form.getDisplayBox('cmdb_ci').value;
g_form.showFieldMsg('cmdb_ci',ci_name,'error');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2016 01:47 PM
Thanks heaps Pradeep.
I am very new to Javascripting and ServiceNow. Can you please suggest some ways of brushing up my scripting skills at my own pace?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2016 01:49 PM
Hi Varun,
Lots of ways - w3schools.org is a great place. We also have some good options here:
Learning ServiceNow from Scratch and Prepping for the Certification Exam
ServiceNow Developers(get a free instance)
Training and Certification | IT Systems Management | ServiceNow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2016 01:57 PM
Thanks Chuck

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2016 01:58 PM
You are very welcome. Some day I'll get my video series on JavaScript in ServiceNow (a primer to the course) going.