What is the typeOf check box?

Udbhav
Tera Contributor
I  thought it should be a Boolean, but it does not look like.
Below code is failing.
 
if(g_form.getValue("vip") == true){
        alert("User is VIP");
  }
  else{
    alert("User is not VIP");
  }
1 ACCEPTED SOLUTION

Hi @Udbhav 

 

You can create UI policy

AGLearnNGrow_0-1708347128491.png

 

You need to click on Show related Field (at the last in drop down)

and select caller.Releated Field (my case for change table)

and then use script tab to show alert.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

View solution in original post

6 REPLIES 6

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Udbhav 

 

What you want to achieve and what script you are running?

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Hi AG,

Actually, I am confused.....problem is, if caller is VIP then I want to get notified via alert.

So, I write this simple code but in alert box is blank when popup.

Can you please guide where I am getting wrong.

Hi @Udbhav 

 

You can create UI policy

AGLearnNGrow_0-1708347128491.png

 

You need to click on Show related Field (at the last in drop down)

and select caller.Releated Field (my case for change table)

and then use script tab to show alert.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Yes AG, 

I was trying to achieve it with Client script. But ya thanks for the help I can do it with UI Policy as well, don't know how it slipped from my mind.

 

By the way, what a coincidence....I got to know about you today from "Chai Pe Charcha" with Ravi and Omender.

And here you came to help me.😀