在具有多个字段的Filemaker Pro(v9)计算中使用IsEmpty函数 [英] Using IsEmpty function in a filemaker Pro (v9) calculation with multiple fields

查看:58
本文介绍了在具有多个字段的Filemaker Pro(v9)计算中使用IsEmpty函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想编写一个简单的计算以基于字段的层次结构返回值.

I want to write a simple calculation to return a value based on a heirarchy of fields.

如果第一个字段为空,我希望它返回第二个,如果第二个字段为空,则第三个.我尝试了以下方法,但它仅返回第一个值.

If the first field is empty, I want it to return the second, and if the second is empty, the third. I have tried the following but it only returns the first value.

If (IsEmpty (Field1 = 1) ; Field2;
If (IsEmpty (Field2 = 1); Field3; Field1))

我能够使用以下方法获得第一个或第三个值:

I was able to get the first or third value to appear by using:

If (IsEmpty (Field1) &
If (IsEmpty (Field2); Field3; Field1))

但是,这当然根本不显示Field2.

But of course this doesn't show the Field2 at all.

是否有类似的东西:

If (IsEmpty (Field1) &
If (IsEmpty (Field2); Field3; Field1, Field2))

我可以使用哪个? 这显然不起作用,因为函数中的参数太多.

任何帮助将不胜感激! :-)

Any help would be very much appreciated! :-)

推荐答案

您需要嵌套更多计算内容:

You need to nest your calc a bit more :

Case ( 
IsEmpty ( Field1 & Field2 ) ; Field3 ;
IsEmpty ( Field1 ) ; Field2 ;
Field1
)

在您的示例中,您有IsEmpty (Field1 = 1)可以测试Field1=1,该值可以为True或False,但绝不能为空.并且&是concatentation运算符,如果您要逻辑,然后改用and.

In your examples, you had IsEmpty (Field1 = 1) which will test Field1=1, which is either True or False, but never empty. And the & is a concatentation operator, if you're wanting logical and then use and instead.

这篇关于在具有多个字段的Filemaker Pro(v9)计算中使用IsEmpty函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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