Maximo公式可以返回null吗?

编程入门 行业动态 更新时间:2024-10-25 18:36:12
本文介绍了Maximo公式可以返回null吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

在Maximo 7.6.1.1中:

In Maximo 7.6.1.1:

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

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:

  • 如果WOSERVICEADDRESS.LONGITUDEX不为null,请使用它
  • 否则,如果ASSET.X不为null,请使用它
  • 否则,如果LOCATION.X不为null,请使用它
    • 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
    • 这是我想出的表达方式:

      This is the expression I've come up with:

      NVL(SERVICEADDRESS$LongitudeX, NVL(ASSET$X, NVL(LOCATION$X,0) ) ) ^ I would prefer null, not 0

      问题:

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

      If all of the search-values end up being null, is there a way to return null, rather than 0?

      我尝试使用单词null,但出现错误:

      I've tried using the word null, but I get an error:

      BMXAA9399E - This formula is invalid because the following attribute or token is invalid: null. Specify a valid attribute and try again.

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

      I've also tried "", but that returns 0.

      使用值为null的字段也会引发错误.

      And using a field where the value is null also throws an error.

      我在这里有一个相关的问题: Maximo公式使用自定义公式函数/自动化脚本?

      I have a related question here: Maximo formula that uses a custom formula function/automation script?

      推荐答案

      我对公式的使用还不多,但是它们用于计算数学值:

      I haven't played much with the formulas yet but they are used to calculate math values:

      从文档中:

      Maximo公式的范围限于数学表达式和 因此只能用于计算数值.

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

      来源: Maximo公式PDF

      因此,如果确实需要获取null值,则最好使用自动化脚本.

      So you might be better to use an automation script if you really need to get a null value.

更多推荐

Maximo公式可以返回null吗?

本文发布于:2023-11-10 03:07:20,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1574182.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:公式   Maximo   null

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!