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:
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 9 shows how to use the predefined UI properties to constrain the user's choices.
Table 9. UI Properties
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.
- 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%".
- 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]
$.[Bank Prod].[Banking Rel][Checking Prod]#1.xa[Role].xf[Value]
- 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]
$.[Bank Prod].[Banking Rel][Checking Prod]#1.xf[List Price]
- 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]')'
[Job Title] = 'CfgEval('$Cur.xa[Job Role].xf[Value]')'
[Job Title] = 'CfgEval('$Int.[12-BANK34].[Banking Rel][Checking Prod]#1.xa[Job Role].xf[Value]')'
[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
- Navigate to the Administration - Product screen, then the Product Definitions view.
- Select and lock the desired product with components.
- Navigate to the Properties view.
- Select the desired attribute.
- Define the UI properties as shown in Table 9.