Today I have discovered a strange behavior when setting long descriptions from an automation script.
You know that almost every DESCRIPTION field in Maximo has a corresponding “Long Description” field that is a CLOB attribute that can hold big amounts of text. This is driven by the “Long Description Owner” checkbox in Database Configuration.
When this flag is selected, a non-persistent attribute named DESCRIPTION_LONGDESCRIPTION is created and can be get/set as any other attribute.
However, if you just set its value calling the setValue method of the Mbo it will not update the long description as expected.
mbo.setValue("DESCRIPTION_LONGDESCRIPTION", "Test long desc")
To apply the long description, you also have to set the HASLD flag like this.
mbo.setValue("HASLD", True)
mbo.setValue("DESCRIPTION_LONGDESCRIPTION", "Test long desc")
It took some time to discover this flaw so I hope it can be useful if you have the same issue.
Your blog is most helpful; I’ve scoured it looking for a solution to my current problem. I am trying to search the DESCRIPTION_LONGDESCRIPTION for certain text before it is saved to the database. The goal is to prevent the end user from saving certain data into the database. Have you already published a solution to this problem? If not, do you have any suggestions as to how I might solve this issue.
Thanks in advance