Siebel Object Interfaces Reference > Interfaces Reference > Business Component Methods >
The GetMVGBusComp method returns the MVG business component associated with the business component field specified by FieldName. This business component can be used to operate on the multi-value group using the normal business component mechanisms.
Name of the field with a multi-value group attached, used to obtain the multi-value group business component
The multi-value group business component of the current business component and identified field
A multi-value group is a set of detail records attached to the current record in the business component that holds the corresponding multi-value field.
The GetMVGBusComp should be set to Nothing after use.
NOTE: In the context of a many-to-many relationship, you can use Siebel VB to either add a new record, that is, associate a new child record, or insert a record, that is, create a new record in the child business component. To add a record, use GetAssocBusComp and the Associate method. To insert a record, use GetMVGBusComp and the NewRecord method.
COM Data Control, COM Data Server, Java Data Bean, Mobile Web Client Automation Server, Server Script
The following sample VB code using GetMVGBusComp inserts a new address to the "Hong Kong Flower Shop account record. For other examples, read ExecuteQuery Method and FirstSelected Method.
Dim AccntBO as BusObject
Dim AccntBC as BusComp
Dim AddrBC as BusComp
Set AccntBO = TheApplication.GetBusObject "Account"
Set AccntBC = AccntBO.GetBusComp "Account"
.SetSearchSpec "Name", "Hong Kong Flower Shop"
Set AddrBC = .GetMVGBusComp "Street Address"
.SetFieldValue "City", "Denver"
Set AccntBO = Nothing
Set AccntBC = Nothing
Set AddrBC = Nothing