null - Maximo 公式可以返回 null 吗?

标签 null expression formula return-value maximo

在 Maximo 7.6.1.1 中:

我在名为 WORKORDER.X 的持久字段上有一个属性公式.字段类型为十进制,长度为 18,小数位数为 10。

该公式旨在做到这一点:

  • If WOSERVICEADDRESS.LONGITUDEX is not null, use it
  • Else, if ASSET.X is not null, use it
  • Else, if LOCATION.X is not null, use it


这是我想出的表达:
NVL(SERVICEADDRESS$LongitudeX, NVL(ASSET$X, NVL(LOCATION$X,0) ) )
                                                           ^
                                           I would prefer null, not 0

问题:

如果所有搜索值最终都为空,有没有办法返回空,而不是 0?

我试过用 null 这个词,但我收到一个错误:
BMXAA9399E - This formula is invalid because the following attribute or token is 
             invalid: null. Specify a valid attribute and try again.

我也试过 "" ,但返回 0 .

并且使用值为 null 的字段也会引发错误。

编辑:

我在这里有一个相关的问题:Maximo formula that uses a custom formula function/automation script?

最佳答案

我还没有玩过多少公式,但它们用于计算数学值:

从文档:

The scope of Maximo formula's are limited to mathematical expressions and hence it can be only used to calculate numerical values.



来源:Maximo Formulas PDF

因此,如果您确实需要获取 null,最好使用自动化脚本。值(value)。

关于null - Maximo 公式可以返回 null 吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59447159/

相关文章:

clojure - 为什么Clojure之父说Scheme的true/false坏了?

c++ - 不能以 NULL 终止接收缓冲区

generics - 代数表达式 - Kotlin 建模静态和动态属性的方法

latex - 在方程中将 LaTeX 分数项排版得更大

date - 使用 Google Sheets 自动将日期文本转换为正确的日期格式

algorithm - 将光频率转换为RGB?

c - 我如何在c中查看带参数的数组是否为空

c# - 使用 Linq Any 查询或表达式构建查询以提高性能

java - xpath 不接受这个表达式

Delphi 对象、NIL 对象和接口(interface)