bool SetDashboardRelationship(string mon, DashboardRelationship tArg)
mon. Moniker for working with a relation.
tArg. Operation execution parameters.
The SetDashboardRelationship operation changes relation settings.
To execute the operation, in the mon field specify moniker of opened information panel instance with the !Sources!data source!Relationships!relation key postfix, and in the tArg field specify relation settings to be determined. The moniker can be obtained on executing the OpenDashboard operation.
The operation results in the logical true if relation settings were changed successfully.
Below is the example of changing relation settings. The request contains relation moniker and the list of determined settings. The response contains whether changes were applied successfully.
{
"SetDashboardRelationship" :
{
"mon" : "LKACHLFPHPFFGOAEFAJMIHOHCKLEPLKEEIENANDBMODOBJMH!M!S!PHOONDMFPHPFFGOAEGILOHDKLDDEDFAAEEJAAJAMKHGKPJBCK!Sources!1!Relationships!4",
"tArg" :
{
"k" : "4",
"id" : "DOWN_PREV",
"n" : "Previous element of previous level",
"its" :
{
"it" :
[
{
"numField" : "1",
"formula" : "T.DOWN.PREV"
}
]
}
}
}
}
{
"SetDashboardRelationshipResult" : "1"
}
public static bool SetDashboardRelationship(string moniker, uint sourceKey, uint relKey)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tSet = new SetDashboardRelationship()
{
tArg = new DashboardRelationship()
{
k = relKey,
id = "DOWN_PREV",
n = "Previous element of previous level",
its = new DashboardDimensionRelation[]
{
new DashboardDimensionRelation()
{
formula = "T.DOWN.PREV",
numField = 1
}
}
},
// Moniker for working with relation
mon = moniker + "!Sources!" + sourceKey + "!Relationships!" + relKey
};
// Change relation settings
var result = somClient.SetDashboardRelationship(tSet);
return result;
}
See also: