bool SetSemanticLayerSources(string mon, SemanticLayerSources tArg)
mon. Moniker for working with data model sources.
tArg. Operation execution parameters.
The SetSemanticLayerSources operation changes data model sources settings.
To execute the operation, in the mon field specify moniker of opened data model instance with the !Sources postfix, and in the tArg field specify updated source settings. The moniker can be obtained on executing the OpenSemanticLayer operation.
The operation results in the logical True if the settings were changed successfully.
Below is the example of renaming a source in a data model. The request contains moniker for working with sources, key, and new source name. The response contains whether changes were applied successfully.
{
"SetSemanticLayerSources" :
{
"mon" : "LGKNEBJOALBDGOAEFGACCMDHGCIOGFIEGLGKDJFJGPOGPIHE!M!S!PNAAJNCJOALBDGOAEIJDIFGIHNEOBEMIEHIIKOKDEILMGLDPK!Sources",
"tArg" :
{
"its" :
{
"it" :
[
{
"k" : "1",
"n" : "DBServer connection"
}
]
}
}
}
}
{
"SetSemanticLayerSourcesResult" : "1"
}
public static bool SetSemanticLayerSources(string moniker, SemanticLayerSource setSource)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tSet = new SetSemanticLayerSources()
{
tArg = new SemanticLayerSources()
{
its = new SemanticLayerSource[]
{
setSource
}
},
// Moniker of opened data model instance
mon = moniker + "!Sources"
};
// Change information about data model source
var result = somClient.SetSemanticLayerSources(tSet);
return result;
}
See also: