Search code examples
siebel

Can I create a link based on multiple columns in Siebel?


Our Siebel application has 2 tables, both of them sharing 4 text fields. I want to create a link, to show as a child BC all the records from the second table, having the same 4 values as the current record from the first table.

In SQL this could be easily done with something like this:

select    *
from      table1 t1
left join table2 t2 on (t1.a = t2.a and t1.b = t2.b and t1.c = t2.c and t1.d = t2.d)
where     t1.row_id = '1-23456';

Can I build something similar in Siebel 7.8?

I thought creating a link based on any of the text fields (the one with the least repeating values), and then filter the 3 remaining fields in the child BC search spec, but... how do I reference the parent BC values in a search spec? (Without using profile attributes or calculated fields, which would impact too much on performance).

Note: I can't change the tables for this task, however the child BC will be created for this task and won't be used elsewhere.


Solution

  • You will have to use a link search spec. Links can have searchspec, for exactly this reason. Go to links and search for NOT NULL on the searshspec column to see vanilla examples. The link searschspec is always applied on the child bc, so to accesss fields from parent bc, use the ParentFieldValue function

    example:

    [Account Id] = ParentFieldValue ("Account Id")
    

    on link "Account Product - CPG/CG SVP Product Baseline - for Adding Data"