【发布时间】:2014-06-10 07:32:55
【问题描述】:
我在 Siebel 中有一个解决方案,其 IIf (testExpr, expr1, expr2) 表达式在 Pre Default Value 中。我得到了一些伪代码
If Parent BC = BC1 or BC2, default = BC1/BC2.Field, else default = BC3.Field
但我不知道编写正确的语法。我试过这个,但我已经知道这是错误的:):
Expr: "IIf (Parent BC = BC1 OR BC2,
default: BC1.Field/BC2.Field,
default: BC3.Field)"
【问题讨论】:
-
我用这个书架找到了一个解决方案docs.oracle.com/cd/E14004_01/books/ToolsDevRef/… Expr: "IIf (ParentBCName() = 'BC1' OR ParentBCName() = 'BC2', ParentFieldValue (BC1.Field) OR ParentFieldValue (BC2.字段), ParentFieldValue (BC3.Field))"
-
很高兴知道你解决了它。但想指出 siebel 可能会抛出错误。如果 ParentBCName()=BC2,它试图在其中找到字段 BC1.Field,但没有找到,那么由于 OR 条件,将会出错。如果字段名相同并且出现在所有三个 BC 中,它将起作用,但否则会出现错误。检查每个 ParentBC 可能会更好,特别是预先默认其字段而不是 OR 条件。只是一个建议。 Expr: "IIf (ParentBCName() = 'BC1',ParentFieldValue (BC1.Field),(ParentBCName() = 'BC2',ParentFieldValue (BC2.Field),(ParentFieldValue (BC3.Field))))
-
是的,你是对的。我正在尝试这个:Expr: "IIf (ParentBCName() = 'BC1' OR ParentBCName() = 'BC2', ParentFieldValue (field_name), ParentFieldValue (field_name))"
标签: siebel