0
votes

I have a solution in Siebel with the IIf (testExpr, expr1, expr2) expresion in Pre Default Value. I got some pseudo code

If Parent BC = BC1 or BC2, default = BC1/BC2.Field, else default = BC3.Field

but I don't know to write a right syntax. I tried with this, but I already know it's wrong :) :

Expr: "IIf (Parent BC = BC1 OR BC2, 
default: BC1.Field/BC2.Field,
default: BC3.Field)"
1
I found a solution with this Bookshelf docs.oracle.com/cd/E14004_01/books/ToolsDevRef/… Expr: "IIf (ParentBCName() = 'BC1' OR ParentBCName() = 'BC2', ParentFieldValue (BC1.Field) OR ParentFieldValue (BC2.Field), ParentFieldValue (BC3.Field))" - corry
Good to know you solved it. But wanted to point out siebel could throw errors. If ParentBCName()=BC2, and it tries to find field BC1.Field in it, and does not find, then there will be error, due to the OR condition. It will work if the fieldname is same and present in all three BCs, but otherwise, there will be errors. It might be better to check each ParentBC, and specifically predefault its Field instead of OR condition.Just a suggestion. Expr: "IIf (ParentBCName() = 'BC1',ParentFieldValue (BC1.Field),(ParentBCName() = 'BC2',ParentFieldValue (BC2.Field),(ParentFieldValue (BC3.Field)))) - Ranjith R
yes, you're right.I'm trying with this one: Expr: "IIf (ParentBCName() = 'BC1' OR ParentBCName() = 'BC2', ParentFieldValue (field_name), ParentFieldValue (field_name))" - corry

1 Answers

0
votes

There is another way to achieve that, but i have not tried it in such case. Check the below expression:

Parent: 'Customer Product.Account Number', 'Account.Account Number', 'Contact.Account Number', 'LS Medical Product Issue.Account Number', 'Asset Mgmt - Asset.CSN'

this works in if .. elseif .. fashion. It will automatically get the field value based on the parent it is under.

so in your case: Parent: 'BC1.Field1', 'BC2.Field2', 'BC3.Field3'