GetSharedFunctions

Syntax

GetTabUserFunctionsResult GetSharedFunctions(MbId tMb)

Parameters

tMb. Repository connection moniker.

Description

The GetSharedFunctions operation gets a list of custom functions that can be used in formulas.

Comments

To execute the operation, in the tMb field specify repository connection moniker. The moniker can be obtained on executing the OpenMetabase operation.

The operation results in the list of custom functions configured in the repository. Function description and the list of input parameters will be obtained for each function.

Example

Below is the example of getting the list of custom functions that can be used in formulas.

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">
<GetSharedFunctions xmlns="http://www.fsight.ru/PP.SOM.Som">
<tMb xsi:type="q1:OpenMetabaseResult" xmlns="" xmlns:q1="http://www.fsight.ru/PP.SOM.Som">
  <id>KJOFDBINAHDOFOAELHDKMOCHAELFDJAEIIENOHBLOEJDKIOM!M</id>
  <sessKey>271704</sessKey>
  <sessCookie>C2</sessCookie>
  <version>163</version>
  <defLocale>1049</defLocale>
  <driver>2</driver>
  </tMb>
  </GetSharedFunctions>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<GetSharedFunctionsResult 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">
<fns xmlns="">
  <n>test</n>
  <dsc>MyFunc</dsc>
  </fns>
<fns xmlns="">
  <n>CalculateCount</n>
<prms>
  <n>Cells</n>
  <dt>5</dt>
  </prms>
  </fns>
<fns xmlns="">
  <n>GetData</n>
  </fns>
<fns xmlns="">
  <n>QuadraticEquation</n>
<prms>
  <n>a</n>
  <dt>2</dt>
  </prms>
<prms>
  <n>b</n>
  <dt>2</dt>
  </prms>
<prms>
  <n>c</n>
  <dt>2</dt>
  </prms>
  </fns>
<fns xmlns="">
  <n>UserArima</n>
  </fns>
<fns xmlns="">
  <n>ProblemCreation</n>
  <dsc>arithmetic</dsc>
  </fns>
<fns xmlns="">
  <n>UserProc</n>
  <dsc>pointwise</dsc>
  </fns>
<fns xmlns="">
  <n>ModelVariable</n>
  <dsc>series</dsc>
  </fns>
<fns xmlns="">
  <n>test11</n>
  <dsc>Extrapolate</dsc>
<prms>
  <n>StartValue</n>
  <dt>2</dt>
  <dsc>Initial value</dsc>
  </prms>
<prms>
  <n>IsYear</n>
  <dt>4</dt>
  <dsc>Indicates whether ready data is used</dsc>
  </prms>
  </fns>
<fns xmlns="">
  <n>TransformData</n>
<prms>
  <n>Input</n>
  <dt>5</dt>
  </prms>
<prms>
  <n>Output</n>
  <dt>5</dt>
  </prms>
  </fns>
<fns xmlns="">
  <n>CalcUserRegression</n>
  <dsc>Transforms data using linear regression (custom algorithm). Transforms data using linear regression (custom algorithm).</dsc>
<prms>
  <n>Factor</n>
  <dt>5</dt>
  <dsc>Factor impacting modeling data. Factor that affects output data.</dsc>
  </prms>
<prms>
  <n>Constant</n>
  <dt>2</dt>
  <dsc>Custom value of constant.</dsc>
  </prms>
  </fns>
<fns xmlns="">
  <n>test1</n>
  </fns>
<fns xmlns="">
  <n>PiDiv</n>
  <dsc>Divide value into Pi</dsc>
<prms>
  <n>Input</n>
  <dt>2</dt>
  </prms>
  </fns>
  </GetSharedFunctionsResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"GetSharedFunctions" :
{
"tMb" :
{
"@type" : "q1:OpenMetabaseResult",
"id" : "KJOFDBINAHDOFOAELHDKMOCHAELFDJAEIIENOHBLOEJDKIOM!M",
"sessKey" : "271704",
"sessCookie" : "C2",
"version" : "163",
"defLocale" : "1049",
"driver" : "2"
}
}
}

JSON response:

{
"GetSharedFunctionsResult" :
{
"fns" :
[
{
"n" : "test",
"dsc" : "MyFunc"
},
{
"n" : "CalculateCount",
"prms" :
{
"n" : "Cells",
"dt" : "5"
}
},
{
"n" : "GetData"
},
{
"n" : "QuadraticEquation",
"prms" :
[
{
"n" : "a",
"dt" : "2"
},
{
"n" : "b",
"dt" : "2"
},
{
"n" : "c",
"dt" : "2"
}
]
},
{
"n" : "UserArima"
},
{
"n" : "ProblemCreation",
"dsc" : "arithmetic"
},
{
"n" : "UserProc",
"dsc" : "pointwise"
},
{
"n" : "ModelVariable",
"dsc" : "series"
},
{
"n" : "test11",
"dsc" : "Extrapolate",
"prms" :
[
{
"n" : "StartValue",
"dt" : "2",
"dsc" : "Initial value"
},
{
"n" : "IsYear",
"dt" : "4",
"dsc" : "Indicates whether ready data is used"
}
]
},
{
"n" : "TransformData",
"prms" :
[
{
"n" : "Input",
"dt" : "5"
},
{
"n" : "Output",
"dt" : "5"
}
]
},
{
"n" : "CalcUserRegression",
"dsc" : "Transforms data using linear regression (custom algorithm). Transforms data using linear regression (custom algorithm).",
"prms" :
[
{
"n" : "Factor",
"dt" : "5",
"dsc" : "Factor impacting modeling data. Factor that affects output data."
},
{
"n" : "Constant",
"dt" : "2",
"dsc" : "Custom value of constant."
}
]
},
{
"n" : "test1"
},
{
"n" : "PiDiv",
"dsc" : "Divide value into Pi",
"prms" :
{
"n" : "Input",
"dt" : "2"
}
}
]
}
}
public static GetTabUserFunctionsResult GetSharedFunctions(MbId mb)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tGet = new GetSharedFunctions()
{
tMb = mb
};
// Get information about available custom functions
var result = somClient.GetSharedFunctions(tGet);
return result;
}

See also:

Specific Operations