Current.xxx returned string "null" in business rule
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-06-2021 02:38 AM
Hi all,
I am using current.xxx or current.getValue("xxx") in business rule for getting a reference field.
The reference field was set to empty, however, I got a string "null" so that I cannot use some function to check if the field was empty, because a string "null" is also "has value".
How to check a reference field is empty in the business rule?
Regards,
Ming
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-06-2021 02:50 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-06-2021 02:55 AM
Refer this URL for gs.nil() documentation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-06-2021 07:12 AM
The problem here is the string is not an empty string, the value is "null" (not the keyword null).

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-06-2021 07:18 AM
Then check like this:
if((!gs.nil(current.xxx)) && (current.xxx != "null")){
// write your logic
}