ClearMappings(Attribute: IRdsAttribute): Boolean;
Attribute - the MDM dictionary attribute, for which it is necessary to clear binding to fields of export table.
The ClearMappings method clears binding of an attribute passed by the Attribute parameter to fields of a table, into which data is exported.
Executing the example requires the MDM repository NSI_1 that contains an MDM dictionary with the Dict_1 identifier.The dictionary contains an export scheme with the Export1 identifier set up on data export to any table.
Sub Main;
Var
MB: IMetabase;
MObj: IMetabaseObject;
Dict: IRdsDictionary;
Export: IRdsExportSchemas;
SchemaExport: IRdsExportSchema;
Attrs: IRdsAttributes;
Attr: IRdsAttribute;
Begin
MB := MetabaseClass.Active;
MObj := MB.ItemByIdNamespace("Dict_1", MB.ItemById("NSI_1").Key).Edit;
Dict := MObj As IRdsDictionary;
Attrs := Dict.Attributes;
Export := Dict.ExportSchemas;
SchemaExport := Export.FindById("Export1");
For Each Attr In Attrs Do
SchemaExport.ClearMappings(Attr);
End For;
MObj.Save;
End Sub Main;
After executing the example binding to fields of the exported table is cleared by all attributes of the MDM dictionary.
See also: