Search Specification on Applet and BC– Interview Question.

This is a pretty popular and interesting question. I guess anybody who knows Siebel architecture (Layered Architecture not Server Architecture) properly should be able to answer it. But truth is that most of the people I have interviewed have given a wrong answer of this question. Even people have 2 years of experience have got it wrong.

The question is something like this.

I have a search spec on applet which says [Type] = “A” and I have Search Spec on BC which says [Type] =”B”. Now what records will be visible to me on UI?

Before looking at the answer of this question I would like you to have a thought on this and answer it to yourself and see if you can get it right. Having a guess is not sufficient you should also give the reason for your answer.

  1. Records with Type A
  2. Records with Type B
  3. None


Answer to above question is
None

Explaination:

We all know about 3 layered architecture of Siebel.

Database is going to fetch all the records which will reach business layer. Here Search Spec of the BC will filter the records with Type B and only records with Type A will be allowed to reach next layer that is UI layer. Here the search spec of applet will come into picture and records with Type A are going to get filtered which means that number of records reaching to user will be ZILCH :)

In other words search spec on Applet and BC takes AND operator and the where clause in SQL is going to be Where type = ‘A’ and type = ‘B’ which will always return zero records hence no records on UI

Hope that helps :)

Related Questions

neel tagged this post with: , Read 39 articles by
  • Namrata

    Hi,

    This is very popular mistake done by developers. Infact Siebel Support have a well explanatory note on the above.

  • java

    nice blog … do write more realted to interview question

  • http://www.nachofoto.com Hiren

    great thoughts and sharing of knowledge keep going

  • Abhi_Guru

    pranam maalik accha likhne lage hain aap….. at least its making sure that ur next project will do good….. :)

  • http://siebelunleashed.com/applet-search-spec-%e2%80%93-interview-question/ Applet Search Spec – Interview Question. | Siebel Unleashed

    [...] is the variation of the question that I had earlier posted and it is also related to Search Spec but this time it is conflicting [...]

  • Soj

    hey good one….keep positng !!!!

  • Ms.Nair

    Hey nice one…I was asked the same question in interview..so you can take my word surely an interview question :)

  • Pankaj

    How can you say that after AND of serahc spec , it will return zero rows ?? It can return rows which depend on the type of search specs being given at both levels.
    Example :-

    Records :-
    Name =Pankaj ,Age = 21
    Name =Ashish ,Age = 21

    BC search spec -> Age=21
    Applet Search Spec -> Name =’Pankaj’

    Effective Search Spec -> Name =Pankaj AND Age = 21

    So 1 record will be displayed on UI !!

  • neel

    what you have displaying is that searchspec is on different fields. it will return case in your example. but what I am talking about is search spec on same fields. So,taking your example it would be like

    Records :-
    Name =Pankaj ,Age = 21
    Name =Ashish ,Age = 21

    BC search spec -> Age=21
    Applet Search Spec -> Age =’20’

    Effective search spec: Age = 20 and Age = 21
    hence no records.

    I hope this clears your doubt

  • Newbee

    Hi Neel and all other siebelunleashedites,

    I am new to siebel so please pardon if its a very silly question. I was just working on a requirement which is

    When the Opportunity Sales Stage is changed to “07 – Funded”, the Description field should be updated to “Revenue = ” .

    Probably the approach would be to use the On Field Update user property in which i have to give a If condition.

    Well, the point where I’m getting stuck is that the PickList “PickList Sales Stage” doesnt have a type and type value so how do i capture the sales stage value and according set the value for the description field.

    Please please please ……help me with this…

    Thanks in Advance

    Regards.
    Newbee

  • Devu Nair

    Hello Neel,

    i have one doubt. Ur saying that we are giving a serch spec as Type=B in BC.It means it will search for only those records with Type as “B” and pass only the records with Type as “B”. AM I CORRECT?
    But i saw in ur post that “Here Search Spec of the BC will filter the records with Type B and only records with Type A will be allowed to reach next layer that is UI layer”
    please correct me if am wrong.

    One more doubt.
    ur saying search spec on Applet and BC takes AND operator. But according to my understanding.. Applet will overrules BC. please dont mind if it is wrong.

    Thanks in Advance
    devu

  • Satish

    Hi Devu,

    I would like to give my comment on your saying that Applet Search Spec overrules BC Searspec,It’s not true. If it overrules BC Search Spec it should return the records filtered by Applet Search Spec, which does not happen. An applet search specification cannot be used to override the search specification of the underlying business component, if the business component has one. Rather than overriding the business component’s search specification, the applet’s search specification is appended to that of the business component.

    Hope this helps. Pls share if there any other views.

    Thanks
    Satish

  • SreeHarsha GV

    Hi,
    i have a similar question. Consider in a view we have 1) one list applet, 2) Form applet where both are based on same BC. We know Form applet gives the details of record selected at list applet. Question is what happens if the search specification at applet level for Form applet and List here are different? What does the Form applet display if the search specification is contradicting from that of List applets?
    Hope i have put the question clearly.

  • Abhishek

    It will fetch records with both Type A and Type B as this is working as AND operator.

    Search spec works as where clause and we are filtering the data with Type A and Type B so the output will have type A and type B both.