CreateRdsElement

Syntax

CreateRdsElementResult CreateRdsElement(RdsId tRds, CreateRdsElementArg tArg)

Parameters

tRds. Moniker of opened MDM dictionary instance.

tArg. Operation execution parameters.

Description

The CreateRdsElement operation creates or edits element in MDM dictionary.

Comments

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.

Example

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.

SOAP request:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<CreateRdsElement xmlns="http://www.fsight.ru/PP.SOM.Som">
<tRds xmlns="">
  <id>IENCFEAEIJJEGOAEBOMILAAAFCDPKEPEOLCOBNEJCOFGNDKK!M!S!NMLBPBFAEIJJEGOAEGMHMCAMPNPBCIIHEAIADFGGFONBIEDAA</id>
  </tRds>
  </CreateRdsElement>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<CreateRdsElementResult xmlns="http://www.fsight.ru/PP.SOM.Som" xmlns:q1="http://www.fsight.ru/PP.SOM.Som" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<id xmlns="">
  <id>IENCFEAEIJJEGOAEBOMILAAAFCDPKEPEOLCOBNEJCOFGNDKK!M!S!NMLBPBFAEIJJEGOAEGMHMCAMPNPBCIIHEAIADFGGFONBIEDAA</id>
  </id>
<its xmlns="">
<it>
  <id>TOLINK</id>
  <value>IENCFEAEIJJEGOAEBOMILAAAFCDPKEPEOLCOBNEJCOFGNDKK!M!S!NMLBPBFAEIJJEGOAEGMHMCAMPNPBCIIHEAIADFGGFONBIEDAA!Links!1!DimSelection</value>
  </it>
  </its>
  </CreateRdsElementResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"CreateRdsElement" :
{
"tRds" :
{
"id" : "IENCFEAEIJJEGOAEBOMILAAAFCDPKEPEOLCOBNEJCOFGNDKK!M!S!NMLBPBFAEIJJEGOAEGMHMCAMPNPBCIIHEAIADFGGFONBIEDAA"
}
}
}

JSON response:

{
"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:

Working with MDM Dictionaries