Hi Serge. Good idea. Thanks.
I tried IF instead of NVL, but
unfortunately, I still have the same problem. I can't return null:
IF(1=1,1,null)
BMXAA9399E - This formula is invalid because the following attribute or token is invalid: null. Specify a valid attribute and try again.
------------------------------
Thanks
------------------------------
Original Message:
Sent: Mon January 06, 2020 07:51 AM
From: Serge Gagnon
Subject: Can formulas return null?
Did you try "IF(isnull$WORKORDER.X...." instead of NVL ? You can use a condition as well. If it does not work, sometime it's easier to use an automation skip instead of a formula. Your case is easy to code in a script.
------------------------------
Serge Gagnon
STI Maintenance
Jonquiere QC
Original Message:
Sent: Sun December 22, 2019 02:35 PM
From: User1971
Subject: Can formulas return null?
In Maximo 7.6.1.1,
I have an attribute formula on a persistent field called WORKORDER.X. The field type is decimal, length is 18, and scale is 10.
The formula is meant to do this:
If not null, use WOSERVICEADDRESS.LONGITUDEX
Else, if not null, use ASSET.X
Else, if not null, use LOCATION.X
This is the expression I've come up with:
NVL(SERVICEADDRESS$LongitudeX, NVL(ASSET$X, NVL(LOCATION$X,0) ) )
Question:
If all of the search-values end up being null, is there a way to return null, rather than 0?
I've tried just typing the word null, but get an error:
BMXAA9399E - This formula is invalid because the following attribute or token is
invalid: null. Specify a valid attribute and try again.
I've also tried "", but that returns 0.
#Maximo
#AssetandFacilitiesManagement