How to make field visible by using client script
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2019 08:36 AM
In change request there is field 'Risk', this Risk field is choice list.once choice is 'high' selected from Risk field i want 'access' field in the change task should visible. i can do this by using UI policy. but to do by using client script. for my requirement i need to use client script.
Labels:
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2019 08:45 AM
https://developer.servicenow.com/app.do#!/api_doc?v=newyork&id=r_GlideFormSetVisible_String_Boolean
Please mark my response as correct and helpful if it helped solved your question.
-Thanks

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2019 08:46 AM
Hello,
Create an onChange Client Script on the Risk field then add following logic:
if(newValue == 'high'){
g_form.setDisplay('Access','true');
}else{
g_form.setDisplay('Access','false');
}