How to check if reference field is empty in server script?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-18-2022 11:29 PM
How to check if reference field is empty in server script?
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-18-2022 11:33 PM - edited ‎10-18-2022 11:45 PM
Try the below
if(JSUtil.notNil(current.getValue('field_name')) //Non-empty
OR
if(current.getValue('field_name')) //Non-empty
Community Alums
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-18-2022 11:34 PM
Hi @Akki1 ,
Refer to this Thread : https://www.servicenow.com/community/developer-forum/business-rule-script-to-check-if-reference-fiel...