Need help on MVRS

shaik_irfan
Tera Guru

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 ?

1 ACCEPTED SOLUTION

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");
    }
}

View solution in original post

17 REPLIES 17

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)  
}

@Willem 

 

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

 

find_real_file.png

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");
    }
}

@Willem 

 

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 ?

Which catalog item is it?