Just to be sure the difference between null and ""

Just to be sure I don’t do too much or too little

When I do a query and want to check it’s content for being empty can I than check that with:

dataset.getValue(1,1) == null

or do I do that with

dataset.getValue(1,1) == null || dataset.getValue(1,1) == “”

The same for a dataprovider do I do that with

dataprovidername == null

or

dataprovidername == null || dataprovidername == “”

Thanks

In the method editor, javascript can handle both checks at the same time for you:

if(myField) // if myField has an entry (!= null && !=“”)
{

OR

if(!myField) //if myField doesn’t have an entry (== null || !=“”)
{

same goes for variables, arrays etc..
BTW:
you indeed ALWAYS have to check on both null and “”
(if you create a new record, most of your columns will probably
be null, untill something is entered into them)

Thank you maarten…