IRdsDictionary.UpdateSequence

Syntax

UpdateSequence(Options: RdsUpdateSequenceOptions);

Parameters

Options. Shift type.

Description

The UpdateSequence method updates sequence.

Comments

Use the IRdsDictionary.Open method to open an MDM dictionary.

Example

Executing the example requires:

The example is a handler of the OnClick event for the Button1 component. Add links to the Metabase, Rds system assemblies.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    Mb: IMetabase;
    iRdsDatabaseKey: Integer;
    pDict: IRdsDictionary;
    pDictInst: IRdsDictionaryInstance;
    pData: IRdsDictionaryElementData;
Begin
    Mb := MetabaseClass.Active;
    iRdsDatabaseKey := Mb.GetObjectKeyById("OBJ_RDS");
    pDict := Mb.ItemByIdNamespace("T_SOURSE_RDS", iRdsDatabaseKey).Edit As IRdsDictionary;
    pDict.Attributes.Order.Hidden := False;
    (pDict As IMetabaseObject).Save;
    pDictInst := pDict.Open(Null);
    pDictInst.ClearData;
    pData := pDictInst.CreateElementData;
    pData.Value(1) := "1";
    pDictInst.Insert(-2, pData);
    pData := pDictInst.CreateElementData;
    pData.Value(1) := "2";
    pDictInst.Insert(-2, pData);
    pDict.IsBigDictionary := True;
    pDict.UpdateSequence(RdsUpdateSequenceOptions.Key Or RdsUpdateSequenceOptions.Order);
    (pDict As IMetabaseObject).Save;
    pDictInst := pDict.Open(Null);
    pData.Value(1) := "3";
    pDictInst.Insert(-2, pData);
    pData.Value(1) := "4";
    pDictInst.Insert(-2, pData);
    pDict.IsBigDictionary := False;
    (pDict As IMetabaseObject).Save;
    Mb.DeleteObject((pDict As IMetabaseObject).Key);
End Sub Button1OnClick;

After executing the example MDM dictionary sequence is updated.

See also:

IRdsDictionary