gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-01 03:03:44 40 4
gpt4 key购买 nike

在 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/

40 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com