Assign(Value: IRdsDictionaryFilterConditions);
Value. The collection of filters, which parameters should be copied.
The Assign method copies parameters of the filters collection.
If the Value parameter is set to Null, all parameters of filters collection are reset.
Executing the example requires an MDM repository with the RDS_REPO identifier that contains a non-version MDM dictionary with the DICT identifier. It also requires the FilterCopy object of the IRdsDictionaryFilterConditions type.
Add links to the Metabase and Rds system assemblies.
Sub UserProc;
Var
mb: IMetabase;
RdrRepoDescr: IMetabaseObjectDescriptor;
RdsDictObj: IMetabaseObject;
DictInst: IRdsDictionaryInstance;
DictBatch: IRdsDictionaryBatch;
DelBatch: IRdsDictionaryBatchDelete;
BatchFilters: IRdsDictionaryFilterConditions;
FilterCopy: IRdsDictionaryFilterConditions;
Begin
mb := MetabaseClass.Active;
RdrRepoDescr := mb.ItemById("RDS_REPO");
RdsDictObj := mb.ItemByIdNamespace("DICT", RdrRepoDescr.Key).Edit;
DictInst := RdsDictObj.Open(Null) As IRdsDictionaryInstance;
DictBatch := DictInst.CreateBatch(RdsDictionaryBatchType.Delete);
DelBatch := DictBatch As IRdsDictionaryBatchDelete;
BatchFilters := DelBatch.Filter;
BatchFilters.Assign(FilterCopy);
DelBatch.Execute;
RdsDictObj.Save;
End Sub UserProc;
After executing the example the batch used to remove elements is created. Parameters of batch filtering are copied from the FilterCopy object. Then the batch is executed.
See also: