UpdateRdsSequence: Boolean;
UpdateRdsSequence: Boolean;
The UpdateRdsSequence property determines whether the system sequence is updated, which is used to generate element keys in MDM dictionaries.
The property is set to False by default, and while the dictionary is updated the system sequence is not updated. If the value is set to True, on copying MDM dictionaries the system sequence value is updated. The update is performed according to the following pattern:
The maximum value of the MDM dictionary elements key is determined.
The maximum version value of the MDM dictionary elements is determined.
From the values retrieved the maximum is selected and compared to the current value of the repository system sequence.
If the repository system sequence value is the least, it is substituted to the selected maximum value.
Executing the example requires an MDM repository with the NSI_1 identifier. This repository contains an MDM dictionary with the Dict_1 identifier.
Sub UserProc;
Var
Mb: IMetabase;
MUpdate: IMetabaseUpdate;
RootFolder: IMetabaseUpdateFolderNode;
Node: IMetabaseUpdateDataObjectNode;
Begin
Mb := MetabaseClass.Active;
MUpdate := Mb.CreateUpdate;
RootFolder := MUpdate.RootFolder;
Node := RootFolder.Add(MetabaseUpdateNodeType.DataObject) As IMetabaseUpdateDataObjectNode;
Node.BatchMode := ObjectUpdateDataBatchMode.InsertOnly;
Node.Object := Mb.ItemByIdNamespace("Dict_1", Mb.ItemById("NSI_1").Key).Bind;
Node.UpdatePart := MetabaseObjectUpdatePart.DataMetadata;
Node.UpdateRdsSequence := True;
MUpdate.SaveToFileNF("C:\Dict_1.pefx");
End Sub UserProc;
After executing the example the new update is created. The specified MDM dictionary is included to the update. The data and metadata are updated for the dictionary. The update is saved to the specified file. If the newly created update is applied elsewhere, then the dictionary being updated is updated with the new data only. Also on applying the update the system sequence, that is used for the generation of keys in MDM dictionaries, is updated.
Executing the example requires an MDM repository with the NSI_1 identifier. This repository contains an MDM dictionary with the Dict_1 identifier. The specified procedure is an entry point for any .NET assembly.
Public Shared Sub Main(Params: StartParams);
Var
Mb: IMetabase;
MUpdate: IMetabaseUpdate;
RootFolder: IMetabaseUpdateFolderNode;
Node: IMetabaseUpdateDataObjectNode;
Begin
Mb := Params.Metabase;
MUpdate := Mb.CreateUpdate();
RootFolder := MUpdate.RootFolder;
Node := RootFolder.Add(MetabaseUpdateNodeType.untDataObject) As IMetabaseUpdateDataObjectNode;
Node.BatchMode := ObjectUpdateDataBatchMode.obupdabamoInsertOnly;
Node.Object := Mb.ItemByIdNamespace["Dict_1", Mb.ItemById["NSI_1"].Key].Bind();
Node.UpdatePart := MetabaseObjectUpdatePart.moupDataMetadata;
Node.UpdateRdsSequence := True;
MUpdate.SaveToFileNF("C:\Dict_1.pefx");
End Sub;
After executing the example the new update is created. The specified MDM dictionary is included to the update. The data and metadata are updated for the dictionary. The update is saved to the specified file. If the newly created update is applied elsewhere, then the dictionary being updated is updated with the new data only. Also on applying the update the system sequence, that is used for the generation of keys in MDM dictionaries, is updated.
See also: