GetDmCalc

Syntax

DmCalcResult GetDmCalc(DmId tDim, GetDmCalcArg tArg)

Parameters

tDim. Moniker of opened calculated dictionary instance.

tArg. Operation execution parameters.

Description

The GetDmCalc operation gets calculated dictionary metadata.

Comments

This operation enables the user to get information about calculated dictionary structure: attributes, blocks, indexes, dictionary levels, macro for building an element tree and other settings that affect dictionary work. To execute the operation, in the tDim field specify moniker of calculated dictionary instance, and in the tArg field specify parameters for getting information. The moniker can be obtained on executing the OpenDim operation. Use the tArg.pattern field to specify the pattern that will be used to get information. The result of the operation is the requested metadata.

Example

Below is the example of using the GetDmCalc operation to get information about calculated dictionary structure. The request contains dictionary moniker and the pattern that determines which metadata should be obtained. The response contains the obtained information.

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">
<GetDmCalc xmlns="http://www.fsight.ru/PP.SOM.Som">
<tDim xmlns="">
  <id>S1!M!S!DM1</id>
  </tDim>
<tArg xmlns="">
<pattern>
  <obInst>true</obInst>
  <attributes>Get</attributes>
  <blocks>Get</blocks>
  </pattern>
  </tArg>
  </GetDmCalc>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<GetDmCalcResult 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>S1!M!S!DM1</id>
  </id>
<meta xmlns="">
<obInst>
<obDesc ds="" isShortcut="0" isLink="0" ver="5" hf="0">
  <i>DIM_CALC</i>
  <n>Dictionary</n>
  <k>175067</k>
  <c>1027</c>
  <p>175063</p>
  <h>0</h>
  <hasPrv>0</hasPrv>
  <ic>0</ic>
  <isPermanent>1</isPermanent>
  <isTemp>0</isTemp>
  </obDesc>
  </obInst>
  <dirty>0</dirty>
<attributes>
<attributes>
<it>
  <k>1</k>
  <name>Name</name>
  <id>NAME</id>
  <dataType>1</dataType>
  <visible>1</visible>
  <nameDest>1</nameDest>
  <hasHierarchy>0</hasHierarchy>
<order>
  <pattern>None</pattern>
  </order>
  </it>
<it>
  <k>2</k>
  <name>Identifier</name>
  <id>ID</id>
  <dataType>2</dataType>
  <visible>1</visible>
  <idDest>1</idDest>
  <hasHierarchy>0</hasHierarchy>
<order>
  <pattern>None</pattern>
  </order>
  </it>
<it>
  <k>3</k>
  <name>Order</name>
  <id>ORDER</id>
  <dataType>2</dataType>
  <visible>1</visible>
  <hasHierarchy>0</hasHierarchy>
<order>
  <pattern>Get</pattern>
  <reverse>0</reverse>
  <index>0</index>
  </order>
  </it>
  </attributes>
  <hideInaccessible>1</hideInaccessible>
  </attributes>
<blocks>
<it>
  <k>1</k>
  <id>BLOCK1</id>
  <name>Block1</name>
<indexes>
<it>
  <k>1</k>
  <id>PRIMARY_INDEX</id>
  <name>Primary index of the Block1 block</name>
  <primary>1</primary>
  <unique>1</unique>
<indexAttributes>
  <it>ID</it>
  </indexAttributes>
  </it>
  </indexes>
  </it>
  </blocks>
  </meta>
  </GetDmCalcResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"GetDmCalc" :
{
"tDim" :
{
"id" : "S1!M!S!DM1"
},
"tArg" :
{
"pattern" :
{
"obInst" : "true",
"attributes" : "Get",
"blocks" : "Get"
}
}
}
}

JSON response:

{
"GetDmCalcResult" :
{
"id" :
{
"id" : "S1!M!S!DM1"
},
"meta" :
{
"obInst" :
{
"obDesc" :
{
"@ds" : "",
"@isShortcut" : "0",
"@isLink" : "0",
"@ver" : "5",
"@hf" : "0",
"i" : "DIM_CALC",
"n" : "Dictionary",
"k" : "175067",
"c" : "1027",
"p" : "175063",
"h" : "0",
"hasPrv" : "0",
"ic" : "0",
"isPermanent" : "1",
"isTemp" : "0"
}
},
"dirty" : "0",
"attributes" :
{
"attributes" :
{
"it" :
[
{
"k" : "1",
"name" : "Name",
"id" : "NAME",
"dataType" : "1",
"visible" : "1",
"nameDest" : "1",
"hasHierarchy" : "0",
"order" :
{
"pattern" : "None"
}
},
{
"k" : "2",
"name" : "Identifier",
"id" : "ID",
"dataType" : "2",
"visible" : "1",
"idDest" : "1",
"hasHierarchy" : "0",
"order" :
{
"pattern" : "None"
}
},
{
"k" : "3",
"name" : "Order",
"id" : "ORDER",
"dataType" : "2",
"visible" : "1",
"hasHierarchy" : "0",
"order" :
{
"pattern" : "Get",
"reverse" : "0",
"index" : "0"
}
}
]
},
"hideInaccessible" : "1"
},
"blocks" :
{
"it" :
{
"k" : "1",
"id" : "BLOCK1",
"name" : "Block1",
"indexes" :
{
"it" :
{
"k" : "1",
"id" : "PRIMARY_INDEX",
"name" : "Primary index of the Block1 block",
"primary" : "1",
"unique" : "1",
"indexAttributes" :
{
"it" : "ID"
}
}
}
}
}
}
}
}
public static GetDmCalcResult GetUsertDimension(DmId moniker)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tGet = new GetDmCalc()
{
tArg = new GetDmCalcArg()
{
pattern = new DmCalcMdPattern()
{
attributes = ListOperation.Get,
blocks = ListOperation.Get,
}
},
tDim = moniker
};
//Get information about calculated dictionary
var result = somClient.GetDmCalc(tGet);
return result;
}

See also:

Working with Dictionaries