Want to display pop up with url when filed value changes in service portal

siva14
Tera Contributor

for catalog item, we have a variable called "do you need data migration" (yes/no) values, whenever user select Yes, want to display pop up message like ( Please use this link for one drive setup "www.google.com" ) so when he click the link the page will open in new window, if this possible , could you please help me in this.

3 REPLIES 3

Yousaf
Giga Sage

Hi Siva,

Please refer to these links.

How to show popup message in icon link widget

Add URL in Modal Popup as content in Poral Widget.

 

Mark Correct or Helpful if it helps.


***Mark Correct or Helpful if it helps.***

Pavankumar_1
Mega Patron

HI,

if it is a catalog item you want popup message you can use the onchange client script and UI type must be ALL then only it will work on portal and backend as well.

function onChange(control, oldValue, newValue, isLoading) {
   if (isLoading || newValue == '') {
      return;
   }
    var start = g_form.getValue('do you need data migration');  //here add the name of the variable
if(start){
    g_form.addInfoMessage("Please use this link for one drive setup www.google.com");
}
   //Type appropriate comment here, and begin script below
   
}

 

find_real_file.png

 

Hope it helps!!

Please Mark ✅ Correct if applicable, Thanks!! 

 

Regards

Pavankumar

If it helps please click Accept as Solution/hit the Thumb Icon.
ServiceNow Community MVP 2024.
Thanks,
Pavankumar

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

if you are talking about using alert then alert won't support the links and hence you cannot use it

You can refer this article and enhance

CCE5048 - Enhance your Catalog Items with Contextual Popups!

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader