Siebel Product Administration Guide > Product Attributes with Business Component Domains > Process of Creating an Attribute with a Business Component Domain >

Creating a Search Expression Based on the Current Instance


You can constrain the records that display in the pick applet based on an expression that can be computed at run time and is dynamic in nature. The expression can refer to the values in the configuration session. The product administrator can use the standard Siebel Configurator path syntax to define instance variables or values within the search expression.

You do this by defining a PickSpec UI property on an attribute. This additional UI property defines how to constrain the records in the pick applet by specifying the search expression to use to filter the records in the pick applet.

This task is a step in Process of Creating an Attribute with a Business Component Domain.

For example, the Product Administrator has created a product with components called Premier Service Package. This product has been assigned to a product class that has the attributes Job Role, Contact Last Name, Contact First Name defined on it. The Job Role attribute is a drop-down menu with values Please Specify, Manager, and Business Analyst with default attribute value set to Please Specify. The Contact attribute launches the Contact pick applet. These attributes have been added to a group in the User Interface view and will display in selection pages. The Product Administrator wants users to be able to select the Job Role when configuring the product in a quote. When they do, the Product Administrator wants to constrain the Contact pick applet based on the Job Role. For example, if the attribute Job Role is set to Manager and the quote's account name is Boeing, the contact pick applet displays only the contacts who are managers that belong to the Boeing account.

To do this, the Product Administrator must define the following UI properties on the Contact attribute:

  • PickList. Its value is PickList Contact
  • PickApplet. Its value is Contact Pick Applet
  • PickMap01. This UI property provides the name of the attribute and the business component field. Its value is an XML tag that has the following elements:
    • Field = "Contact Last Name". This is the attribute name.
    • PickField = "Last Name". This is the business component field.
  • PickMap02. This UI property defines an attribute that will receive its value automatically when the user selects a value for the primary attribute. In this case, the value is Contact First Name. Its value is an XML tag that has the following elements:
    • Field = "Contact First Name". This is the attribute name.
    • PickField = "First Name". This is the business component field.
  • PickSpec01. This UI property filters the display of records in the pick applet based on a search expression. The expression can include references to the current instance. Its value is an expression that has the following elements:

    [PickField] = 'CfgEval('$Cur.xa[Attr Name].xf[Value]')'

    • PickField = "Job Title". This is the business component field.
    • Attr Name = "Job Role". This is the attribute name of the product

      The expression displays all the contacts whose job title is the same as it is displayed in the Job Role attribute.

  • PickSpec02. This UI property defines additional search specifications. The value is an expression that has the following elements:

    [PickField] = 'CfgEval('$Cur.xa[Attr Name].xf[Value]')'

    • PickField = "Account". This is the business component field.
    • Attr Name = "Account Name". This is the attribute name of the product. The Account Name attribute is bound to the Quote's Account field using the LineItemICField property. For more information, see Binding an Attribute Value to a Line Item Integration Component Field.

      The expression displays all the contacts whose account name is the same as it is displayed in the Account Name attribute.

The Job Role attribute displays with a combo box next to it, and the Contact Last Name and First Name attributes display with a text box next to them in the configuration selection pages. The user sets the Job Role attribute as Manager. When the user clicks the Select button for Contact Last Name, a pick applet displays. It contains only the contacts who are managers that are associated with the account name displayed in the Quote Account field.

Table 8 shows how to use the predefined UI properties to constrain the user's choices.

Table 8. UI Properties
Name
Value

PickSpec 01

This is a search expression used to filter the records displayed in the pick applet. The search expression can include references to the current instance.

  1. You can specify search expressions based on the picklist business component fields. The syntax for the search spec expression will be the same as in BC Search Specification in Oracle Siebel Tools.
    For example, to create a pick spec for showing records in Contact BC that have Last Name starting with A, set the pickspec to: [Last Name] like "A%".
  2. You can specify search expressions based on Attribute names and values. Use the ".xa" operator to return attribute name and the ".xf" operator to return the value. To find the value of an attribute, the CfgPath looks like the following: $.[Root Product].[Rel Name][Product]#InstNum.xa[Attr Name].xf[Value]
    For example:
    $.[Bank Prod].[Banking Rel][Checking Prod]#1.xa[Role].xf[Value]
  3. You can specify search expressions based on line item fields. Use the ".xf" operator to retrieve the field value. To find the field of a product, the CfgPath looks like the following: $.[Root Product].[Rel Name][Product]#InstNum.xf[Field Name]
    For example:
    $.[Bank Prod].[Banking Rel][Checking Prod]#1.xf[List Price]
  4. You can specify search expressions using the CfgEval() function. Replace the string CfgEval(...) with the value of the evaluation. To compare strings in Siebel search expression, the CfgPath needs to be enclosed in single quotes. For example, to create a pick spec for showing records in Contact BC whose job title is the same as it is displayed in the Job Role attribute, you can use the following:
    [Job Title] = 'CfgEval('$.[Bank Prod].[Banking Rel][Checking Prod]#1.xa[Job Role].xf[Value]')'
    OR
    [Job Title] = 'CfgEval('$Cur.xa[Job Role].xf[Value]')'
    OR
    [Job Title] = 'CfgEval('$Int.[12-BANK34].[Banking Rel][Checking Prod]#1.xa[Job Role].xf[Value]')'
    OR
    [Job Title] = 'CfgEval('$Int.[12-CHK34].xa[Job Role].xf[Value]')'

You can specify search expressions to support the Integration ID. When using the Integration ID format, the Integration ID is enclosed in the first square brackets. The Integration ID may be used when you want to refer to a particular instance of a product instead of a random instance. All PickSpecs must have a unique number. For example if there are 4 PickSpecs, name the searchspecs PcikSpec01...PickSpec04.

NOTE:  PickSpecs may include If...Else...If...Else statements (i.e IIF expressions). However, CfgEval functionality is not supported within the IIF expression at this point in time.

To use an expression to constrain the user's choices

  1. Navigate to the Administration - Product screen, then the Product Definitions view.
  2. Select and lock the desired product with components.
  3. Navigate to the Properties view.
  4. Select the desired attribute.
  5. Define the UI properties as shown in Table 8.
Siebel Product Administration Guide Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices.