Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Show field message

Naveen87
Tera Guru

Hi Developers,

 

I have a list collector field called macro_module.

This variable drop-down does not have an option called 'Knowledge'.

 

When an end user search for 'Knowledge' on this variable. I want to show a field msg.

'For Request related to Knowledge Management, Please use Group Membership Management & select Knowledge Management as group name'
 
 
I wrote this onCchange client script but it's not working. Please suggest
 
Naveen87_1-1707285847682.pngNaveen87_2-1707285927765.png

 

11 REPLIES 11

Jyoti Jadhav9
Tera Guru

Hi @Naveen87 ,

 

In your script, Line no.6,  semicolon is missing. Please give the semi-colon and try.

JyotiJadhav9_0-1707286320548.png

Please hit the like button if my suggestion has helped you in any way.
Please mark correct if my response has solved your query.

 

Thanks & Regards

Jyoti Jadhav

Semi-colon ; aren't mandatory & they aren't the issue here.

Naveen87_0-1707287128743.png

 

Unique45
Mega Sage
Mega Sage

Hello @Naveen87,

The if condition seems wrong.

Write if condition as below:

if (fieldValue.toLowerCase().includes ("knowledge')) 

 

Please mark correct/helpful if this helps you!

HI,

Tried but no luck.

Naveen87_1-1707287232105.png

Naveen87_2-1707287244429.png