Oracle database treats empty strings as nulls while IBM DB2 and SQL Server treats empty strings as strings of zero length, not NULLs.
Maximo businessobjects persistence layer always treats empty strings as nulls in order to have a common behavior across different database servers.
The getString function will always returns an empty string if the underlying filed value is an empty string or null. You must use the mbo.isNull method to understand if a string is null (or empty).
For this reason, I always use the following syntax for checking null/empty strings:
if mbo.getString("DESCRIPTION") != "":
mbo.setValue("DESCRIPTION", mbo.getString("CLASSIFICATIONID"))
The following piece of code is exactly equivalent to the above one:
if mbo.isNull("DESCRIPTION"):
mbo.setValue("DESCRIPTION", mbo.getString("CLASSIFICATIONID"))
------------------------------
Bruno Portaluri
Maximo Principal Consultant
OMNINECS Europe
Rome
+393355784962
------------------------------