- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2020 08:32 AM
Hi,
I have Multi row variable set created now my customer want to have a pop up as a hint or a description that displays just like how we set annotation hint for variables
is it possible ?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2020 01:24 PM
Try this:
add a Catalog Client script (on the Catalog Item level) with the following:
function onLoad() {
//Type appropriate comment here, and begin script below
this.my_g_form = g_form;
}
And change your onLoad script to:
function onLoad() {
//Type appropriate comment here, and begin script below
if (parent.g_form) {
g_form.addInfoMessage("message");
}
else if (this.my_g_form) {
this.my_g_form.addInfoMessage("message");
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2020 12:41 PM
You do not need to modify the widget. In your catalog item script just add that. For example like this:
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
var g_form = $scope.page.g_form;
g_form.addInfoMessage(message)
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2020 01:13 PM
I tried your scirpt on the variable set -> catalog client script -> onload
function onLoad() {
//Type appropriate comment here, and begin script below
var g_form = $scope.page.g_form;
g_form.addInfoMessage("message");
}
I am getting an error in the browser console as below
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2020 01:24 PM
Try this:
add a Catalog Client script (on the Catalog Item level) with the following:
function onLoad() {
//Type appropriate comment here, and begin script below
this.my_g_form = g_form;
}
And change your onLoad script to:
function onLoad() {
//Type appropriate comment here, and begin script below
if (parent.g_form) {
g_form.addInfoMessage("message");
}
else if (this.my_g_form) {
this.my_g_form.addInfoMessage("message");
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2020 01:32 PM
As suggested i added catalog client script on catalog item level
function onLoad() {
//Type appropriate comment here, and begin script below
this.my_g_form = g_form;
}
And in side the variable set i created a catalog client script onChange on some variable but it is not setting a message.
😞
https://dev51617.service-now.com/
admin
12345
Do you mind looking at my instance ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2020 01:36 PM
Which catalog item is it?