Siebel Object Interfaces Reference > Interfaces Reference > Business Component Methods >

GetPicklistBusComp


GetPicklistBusComp returns the pick business component associated with the specified field in the current business component.

Syntax

BusComp.GetPicklistBusComp(FieldName)

Argument
Description
FieldName
Name of the field with a picklist specified; used to obtain the pick business component

Returns

The pick business component of the current business component and identified field

Usage

The returned pick business component can be used to operate on the picklist. The GetPickListBusComp should be destroyed after use by using the Nothing function.

NOTE:  When a record is picked on a constrained picklist using the GetPickListBusComp and Pick methods, the constraint is active. Therefore, the retrieved picklist business component contains only those records that fulfill the constraint.

To pick a value from a picklist in Siebel VB

  1. Use GetPicklistBusComp to create an instance of the pick list business component.
  2. Navigate in the picklist business component to the record you want to pick.
  3. Use Pick to pick the value.
  4. Use Set objBCPickList = Nothing to explicitly destroy the picklist business component instance.
Used With

Server Script, Mobile/Dedicated Web Client Automation Server, COM Data Control, COM Data Server, Java Data Bean, CORBA Object Manager

Example

Here is a Siebel VB example.

If Me.GetFieldValue("City") = "San Mateo" Then
   Set oBCPick = Me.GetPicklistBusComp("State")
   With oBCPick
      .ClearToQuery
      .SetSearchSpec "Value", "CA"
      .ExecuteQuery ForwardOnly
      If .FirstRecord Then .Pick
   End With
   Set oBCPick = Nothing
End If

Here is the equivalent example in Siebel eScript.

if (this.GetFieldValue("City") = "San Mateo")
{
   var oBCPick = this.GetPicklistBusComp("State");
   with (oBCPick)
   {
      ClearToQuery();
      SetSearchSpec("Value", "CA");
      ExecuteQuery(ForwardOnly);
      if(FirstRecord())
         Pick();
   }
   oBCPick = null;
}

See Also

FirstSelected
GetMVGBusComp


 Siebel Object Interfaces Reference 
 Published: 18 June 2003