嵌套的IIF语句在Project Professional 2010(公式)中有效,但在MS Project Server 2010中无效。为什么会这样? [英] Nested IIF statements work in Project Professional 2010 (formula) but not in MS Project Server 2010. Why is that?

查看:72
本文介绍了嵌套的IIF语句在Project Professional 2010(公式)中有效,但在MS Project Server 2010中无效。为什么会这样?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以给我一个在MS Project Server 2010上运行的嵌套IIF语句的例子吗?  我在MS Project Professional 2010中创建了一个可以正常工作的自定义字段。  然后我在MS Project Server
2010中创建了另一个自定义字段,并添加了相同的公式,并继续说"此公式包含错误。  更正公式并再次尝试"。  我不确定为什么同样的公式在Proj中有效。专业2010而不是Server 2010. 任何想法都会非常感谢
。  谢谢。  
Could somebody please give me an example of nested IIF statements that work on MS Project Server 2010?  I created a custom field in MS Project Professional 2010 that works fine.  Then I created another custom field in MS Project Server 2010 and added the same formula and it keeps on saying "This formula contains errors.  Correct the formula and try again".  I'm not sure why the same formula works in Proj. Professional 2010 but not on Server 2010.  Any ideas would be much appreciated.  Thank you.  

推荐答案

迈克 - 我通常不会在这里回答,但是因为我期待来自我发布的一个问题,看到了你的问题,我以为我会继续前进。 您示例中的IIF语句缺少"false part"。第二个iif。  MS project pro允许
"错误"并返回"错误"当表达式的错误部分得到满足时(即状态日期小于或等于)。 当您尝试使用相同的公式在Project Server中创建新字段时,它会识别错误。 如果你将
更改为:

Mike - I don't normally answer here, but since I was looking to a response from a question I posted and saw yours, I thought I'd go ahead.  The IIF statement in your example is missing the "false part" of the second iif.  MS project pro allows the "error" and returns "error" when the false part of the expression is met (i.e., the status date is less than or equal).  When you try to use the same formula to create a new field in Project Server, it recognizes the error.  If you change it to something like:

IIf([Baseline Finish] = projdatevalue(" NA"),"no baseline",iif([Status Date] > [基线完成],"状态日期更大","状态小于或等于"))

IIf([Baseline Finish]=projdatevalue("NA"), "no baseline", iif([Status Date]>[Baseline Finish], "status date greater", "status less than or equal"))

它会起作用。

希望有所帮助。

DKLJoe


这篇关于嵌套的IIF语句在Project Professional 2010(公式)中有效,但在MS Project Server 2010中无效。为什么会这样?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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