Populate an alert when Agent tries to enter in additional comments field

Janu sree
Tera Guru

Hi All,

 

Trying to populate an alert as soon the Agent start typing(even a single letter)in Additional comments field , an alert should come up saying "Please be aware  notification will triggers to requestor". 

Ps: This alert should come only once at the start.

 

Please suggest.

1 ACCEPTED SOLUTION

Siva Jyothi M
Mega Sage

Hi @Janu sree,

 

Can you try this on-change client script on Additional Comments.

function onChange(control, oldValue, newValue, isLoading, isTemplate) {
   if (isLoading || newValue === '') {
      return;
   }
if (newValue.length == 1) { 
	alert('Please be aware that this will be shared to the requester');
   }
   
}

Mark this answer as correct and helpful if it solves your issue.

 

Regards,

Siva Jyothi M.

View solution in original post

6 REPLIES 6

Ankur Bawiskar
Tera Patron
Tera Patron

@Janu sree 

on native or portal?

Please share screenshot where are you referring this

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

Hi Ankur,

 

We are trying populate the alert in Workspace/Native view.

 

TIA

 

@Janu sree 

Why not show a field message or help text besides the field so that user is informed on this

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

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Janu sree 

 

Please provide more details, like where you want to set this up, in native view or in portal or some where else.

 

Please mark this response as correct or helpful or the solution accepted if it assisted you with your question.

Regards
Atul G.
Learn N Grow With Atul G

*************************************************************************************************************
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]

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