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 Product 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.
The following table shows how to use the predefined UI properties to constrain the user's choices.
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.
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 the previous table.