IRdsDictionaryFilterConditions.Assign

Syntax

Assign(Value: IRdsDictionaryFilterConditions);

Parameters

Value. The collection of filters, which parameters should be copied.

Description

The Assign method copies parameters of the filters collection.

Comments

If the Value parameter is set to Null, all parameters of filters collection are reset.

Example

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(NullAs 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:

IRdsDictionaryFilterConditions