FindByKindBasis(kKind: MetaAttributeKind; Basis: Integer): IMetaDataMember;
kKind - target attribute type.
Basis - basis, by which search is executed.
The FindByKindBasis method searches a record in the collection by an attribute type and a basis.
Executing the example requires a time series database with the OBJ_FC identifier. The current database has a factor with the 90100 key.
Sub Main;
Var
MB: IMetabase;
RubrIn: IRubricatorInstance;
FactD: IRubricatorFactData;
RubRev: IRubricatorRevision;
Members: IMetaDataMembers;
Begin
MB := MetabaseClass.Active;
RubrIn := MB.ItemById("OBJ_FC").Open(Null) As IRubricatorInstance;
RubRev := RubrIn.OpenRevision("Test_Revision");
FactD := RubrIn.GetFactData(90100, DictionaryGetDataOptions.EditExisting);
If FactD.IsEdited Then
Members := FactD.Record.Members;
Members.FindByKindBasis(MetaAttributeKind.Unit, -1).Value := 3530;
FactD.SaveAndRevise(SaveRubricatorDataOptions.NoRevise);
End If;
End Sub Main;
After executing the example a value of the factor attribute with the 90100 key is changed. An attribute that determines measurement units is received by type and basis.
See also: