ClearMappings(Attribute: IRdsAttribute): Boolean;
Attribute. Attribute of the MDM dictionary, for which it is necessary to clear links to import table fields.
The ClearMappings method clears links of the attribute to the fields of the imported table.
This method returns True if the links have been cleared successfully and False if clearing was not executed. Clearing cannot be executed, for example, if the attribute link is missing or a non-existent attribute is specified.
Executing the example requires the MDM repository NSI_1 that contains an MDM dictionary with the Dict_1 identifier. The dictionary contains an import scheme with the Import1 identifier set up for to import data from any table.
Sub UserProc;
Var
MB: IMetabase;
MObj: IMetabaseObject;
Dict: IRdsDictionary;
Import: IRdsImportSchemas;
SchemaImport: IRdsImportSchema;
Attrs: IRdsAttributes;
Attr: IRdsAttribute;
Begin
MB := MetabaseClass.Active;
MObj := MB.ItemByIdNamespace("Dict_1", MB.GetObjectKeyById("NSI_1")).Edit;
Dict := MObj As IRdsDictionary;
Attrs := Dict.Attributes;
Import := Dict.ImportSchemas;
SchemaImport := Import.FindById("Import1");
For Each Attr In Attrs Do
SchemaImport.ClearMappings(Attr);
End For;
MObj.Save;
End Sub UserProc;
After executing the example binding to fields of the imported table is cleared by all attributes of the MDM dictionary.
See also: