Task Based UI @ Siebel 7.8 | Next Tip »Home

Conditional Search Specification

OkAvarageGoodVery GoodExcellent (4 votes, average: 3.75 out of 5)
Loading ... Loading ...

Few days back I was working on a requirement which was as following:

There is a parent child relationship between BC “X” and BC “Y”.
If  “Aircraft Type” Field in BC “X“ (Parent BC) has value “MIG” then BC “Y” (Child BC) should show records that have “Model Number” (Child BC “Y” field) as 400 otherwise it should show no records.

“Please don’t ask me why is it so?”
Long story, cannot elaborate on it but end result was that we had to achieve the above mentioned result.

Above requirement the most efficient solution was to put a search specification on Link but the catch was the Search Specification doesn’t support conditional expressions like IIF(Parent Field Value = “MIG”, Show Records with Model Number as 400,Show No records).

After a bit of R&D we were able to find out how to put conditional search spec in Search Specification field and here are the steps to achieve it.

  • In BC “Y” (Child BC) Create a calculated field with following details
    Name: Aircraft Type
    Calculated: Y
    Calculated Value: IIf((ParentFieldValue(‘Aircraft Type’) = ‘MIG’, “ShowRecord”, ‘NoRecord’)
  • Goto Link Object
  • In Search Specification field for the link enter following value
    ([Aircraft Type] = “ShowRecord” AND [Model Number] = 400) OR ([Aircraft Type] = “NoRecord”)

That’s it problem solved so now

If Aircraft Type in Parent is “MIG” then child records having model number 400 otherwise it doesn’t display any records

The Trick in this solution is to know the fact that: “If we give OR Operand in Search Specification and give two different criteria then both are evaluated and which ever is true is applied”.

So, the search specification is evaluated using implicit if else by Siebel in case there are more than one criteria.

  • Share/Bookmark

Related Posts


Article by neel

Authors bio is coming up shortly. neel tagged this post with: , Read 387 articles by neel
  • Sirisha
    Hi Neel,

    In Siebel 8.1.1, I've noticed the use of IIf in the Search Specification. Can this be used for dynamic Search Specs?

    Thanks
    Sirisha
  • You can actually skip the calculated field altogether and do something like this in this in the search spec of the link:

    (ParentFieldValue('Aircraft Type') = 'MIG' AND [Model Number] = 400) OR 1 = 0

    The search spec of a link is a filter on the child buscomp, so ParentFieldValue is applicable here.
  • Abhijit
    Hey New Theme is great one. It is much easy to find out the topics of interest now. Keep up the good work...
  • Ajay
    is the function ParentFieldValue(), a sieble suppied vanilla function?
blog comments powered by Disqus

Polls

Do you like the new Comment System and new look to Site?

View Results

Loading ... Loading ...