SetSemanticLayerMeta

Syntax

bool SetSemanticLayerMeta(string mon, SemanticLayerMetaArg tArg)

Parameters

mon. Opened data model instance moniker.

tArg. Operation execution parameters.

Description

The SetSemanticLayerMeta operation changes data model metadata.

Comments

To execute the operation, in the mon field specify moniker of opened data model instance and in the tArg.meta field specify updated metadata. In the current implementation the operation is used to change data model visualization settings. The moniker can be obtained on executing the OpenSemanticLayer operation.

The operation results in the logical true if the metadata was changed successfully.

Example

Below is the example of changing data model visualization settings. The request contains moniker of opened data model instance and visualization settings to be determined. The response contains whether changes were applied successfully.

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">
<SetSemanticLayerMeta xmlns="http://www.fsight.ru/PP.SOM.Som">
  <mon xmlns="">OBNIHFAHPABDGOAEGDPOIOEEEEFKFMOEBLJPNILDEGIADEAK!M!S!POFIOKJAHPABDGOAEHEMNLOGBNPHIANDECKECPPGGIBIEIJCA</mon>
<tArg xmlns="">
<meta>
  <viewSettings>{"version":"2","isHiddenFieldsVisible":true,"previewTableHeight":0.48329355608591884,"targetPreviewTableHeight":1,"previewTableAutoUpdate":true,"sourcesDropdowns":{"1":{"expanded":false},"2":{"expanded":false}},"visibleArea":{"x":0,"y":0,"height":838,"width":990,"offsetX":320,"offsetY":48},"zoom":1}</viewSettings>
  </meta>
  </tArg>
  </SetSemanticLayerMeta>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
  <SetSemanticLayerMetaResult 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">1</SetSemanticLayerMetaResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"SetSemanticLayerMeta" :
{
"mon" : "OBNIHFAHPABDGOAEGDPOIOEEEEFKFMOEBLJPNILDEGIADEAK!M!S!POFIOKJAHPABDGOAEHEMNLOGBNPHIANDECKECPPGGIBIEIJCA",
"tArg" :
{
"meta" :
{
"viewSettings" : "{"version":"2","isHiddenFieldsVisible":true,"previewTableHeight":0.48329355608591884,"targetPreviewTableHeight":1,"previewTableAutoUpdate":true,"sourcesDropdowns":{"1":{"expanded":false},"2":{"expanded":false}},"visibleArea":{"x":0,"y":0,"height":838,"width":990,"offsetX":320,"offsetY":48},"zoom":1}"
}
}
}
}

JSON response:

{
"SetSemanticLayerMetaResult" : "1"
}
public static bool SetSemanticLayerMeta(string moniker, string newViewSettings)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tSet = new SetSemanticLayerMeta()
{
tArg = new SemanticLayerMetaArg()
{
meta = new SemanticLayer()
{
viewSettings = newViewSettings
}
},
// Moniker of opened data model instance
mon = moniker
};
// Change information about data model
var result = somClient.SetSemanticLayerMeta(tSet);
return result;
}

See also:

Working with Data Models