CreateRdsElementResult CreateRdsElement(RdsId tRds, CreateRdsElementArg tArg)
tRds. Moniker of opened MDM dictionary instance.
tArg. Operation execution parameters.
The CreateRdsElement operation creates or edits element in MDM dictionary.
To execute the operation, in the tRds field specify moniker of opened MDM dictionary instance, and in the tArg field specify parameters for creating/editing element. The moniker can be obtained on executing the OpenRds operation.
If the root element is to be created, one does not need to specify anything in the tArg field. If a subelement for any element is to be created, specify parent element key in the tArg.p field. If the existing element is being edited, specify its key in the tArg.k field.
The operation results in the information about attributes linked with other repository dictionaries. This information can be used to set selection by these attributes. If links are not set up in the MDM dictionary, the result contains only dictionary moniker will be available.
Further work for setting attribute values of the created element is executed using the SetRdsElement, SetRdsElements operations.
After applying all changes execute the CloseRdsElement operation to check in the resources that were allocated for linked dictionaries.
Below is the example of creating a new MDM dictionary element. The response contains moniker of opened MDM dictionary instance, the response contains information about attributes linked with other repository dictionaries.
{
"CreateRdsElement" :
{
"tRds" :
{
"id" : "IENCFEAEIJJEGOAEBOMILAAAFCDPKEPEOLCOBNEJCOFGNDKK!M!S!NMLBPBFAEIJJEGOAEGMHMCAMPNPBCIIHEAIADFGGFONBIEDAA"
}
}
}
{
"CreateRdsElementResult" :
{
"id" :
{
"id" : "IENCFEAEIJJEGOAEBOMILAAAFCDPKEPEOLCOBNEJCOFGNDKK!M!S!NMLBPBFAEIJJEGOAEGMHMCAMPNPBCIIHEAIADFGGFONBIEDAA"
},
"its" :
{
"it" :
[
{
"id" : "TOLINK",
"value" : "IENCFEAEIJJEGOAEBOMILAAAFCDPKEPEOLCOBNEJCOFGNDKK!M!S!NMLBPBFAEIJJEGOAEGMHMCAMPNPBCIIHEAIADFGGFONBIEDAA!Links!1!DimSelection"
}
]
}
}
}
public static CreateRdsElementResult CreateRdsElement(string moniker)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tCreate = new CreateRdsElement()
{
tRds = new RdsId() { id = moniker }
};
// Create an element
var tResult = somClient.CreateRdsElement(tCreate);
return tResult;
}
See also: