Maximo公式可以返回null吗? [英] Can Maximo formulas return null?

查看:81
本文介绍了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.

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

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

这篇关于Maximo公式可以返回null吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆