ICubeMetaUpdateAdditionalObjects.FindByKey

Syntax

FindByKey(Key: Integer): ICubeMetaUpdateAdditionalObject;

Parameters

Key. Key of the required object.

Description

The FindByKey method searches for an object in the collection by its key.

Comments

If the object with the specified key is not found, the method returns Null.

Example

Executing the example requires that the repository contains a replication object with the CUBE_META_UPD identifier. Add links to the Cubes and Metabase system assemblies.

    Sub Button3OnClick(Sender: Object; Args: IMouseEventArgs);
    Var
        Mb: IMetabase;
        Update: ICubeMetaUpdateEx;
        AdditionalObjs: ICubeMetaUpdateAdditionalObjects;
        AddObj: ICubeMetaUpdateAdditionalObject;
    Begin
        Mb := MetabaseClass.Active;
        Update := Mb.ItemById("CUBE_META_UPD").Bind As ICubeMetaUpdateEx;
        AdditionalObjs := Update.AdditionalObjects;
        AddObj := AdditionalObjs.FindByKey(1);
        If AddObj <> Null Then
            Debug.WriteLine(Object is found);
        Else
            Debug.WriteLine(Object is not found);
        End If;
    End Sub Button3OnClick;

After executing the example the console window displays the result of searching an object with the 1 key among the objects copied together with the time series database.

See also:

ICubeMetaUpdateAdditionalObjects