IMetaDataMembers.FindByKind

Syntax

FindByKind(kKind: MetaAttributeKind; [StartIndex: Integer = 0]): IMetaDataMember;

Parameters

kKind - attribute type.

StartIndex - start index. Optional parameter, default value is 0.

Description

The FindById method searches a record in the collection by attribute type.

Example

Executing the example requires a time series database with the OBJ_FC identifier. This database includes a factor with the 94000 key.

Sub Main;

Var

MB: IMetabase;

RubrIn: IRubricatorInstance;

FactD: IRubricatorFactData;

RubRev: IRubricatorRevision;

Members: IMetaDataMembers;

MemberRecord: IMetaDataMemberRecord;

Begin

MB := MetabaseClass.Active;

RubrIn := MB.ItemById("OBJ_FC").Open(Null) As IRubricatorInstance;

RubRev := RubrIn.OpenRevision("Test_Revision");

FactD := RubrIn.GetFactData(94000, DictionaryGetDataOptions.EditExisting);

MemberRecord := FactD.Record;

If MemberRecord.IsEdited Then

Members := MemberRecord.Members;

Members.FindByKind(MetaAttributeKind.CalendarLevel).Value := DimCalendarLevel.Year;

FactD.SaveAndRevise(SaveRubricatorDataOptions.NoRevise);

End If;

End Sub Main;

After executing the example calendar frequency is changed for a factor with the 94000 key. An attribute that determines measurement units is received by type.

See also:

IMetaDataMembers