nil() and (empty) fields

Cris6
Kilo Expert

Just a quick (hopefully) trivial question.

I have a field on a table, the field has the word '(empty)' in it, so it is not literally empty, but instead states that it is (empty).

I have a script using the nil() GlideElement.

What I want to know, will nill() return false on this field? Because there is the string (empty) in there? Or does (empty) literally mean empty, therefore nill() will be true?

1 ACCEPTED SOLUTION

Harsh Vardhan
Giga Patron

is it reference field or string type field? 

if reference type field then it will be empty and nil() will be true. if its string type field then it is actually a string there so it will not give true. 

 

View solution in original post

5 REPLIES 5

Indrajit
Mega Guru

Hey Cris,

Like you said that its just a word 'empty' that means it is a string value so it will not nil.

 

kindly mark Correct and Helpful if applicable.

Regards,

Indrajit.