GetFormulaEditorInfoResult GetFormulaEditorInfo(MbId tMb, GetFormulaEditorInfoArg tArg)
tMb. Repository connection moniker.
tArg. Operation execution parameters.
The GetFormulaEditorInfo operation is used to get a list of functions that can be used to create expressions in various tools of Foresight Analytics Platform.
To execute the operation, in the tMb field specify moniker of the repository connection, and in the tArg.pattern field specify the pattern, according to which information about functions is obtained. The moniker can be obtained on executing the OpenMetabase operation.
The operation results in the list of functions. Name, description, syntax and other additional parameters are available for each function. The obtained functions can be used to create various expressions in text form or in the SetExp operation. To use the function in the expression, set required parameters according to the syntax that is available in the item.arguments field.
Below is the example of using the GetFormulaEditorInfo operation to get a list of functions that can be used in expressions on working with ADOMD cubes.
{ "GetFormulaEditorInfo" : { "tMb" : { "id" : "S1!M" }, "tArg" : { "pattern" : { "userRPath" : "true", "isRExist" : "true", "formulaEditorFunctions" : "Adomd" } } } }
{ "GetFormulaEditorInfoResult" : { "meta" : { "userRPath" : "", "isRExist" : "0", "formulaEditorFunctions" : { "its" : { "Item" : [ { "category" : "Time", "format" : "", "dontCheckInParser" : "1", "name" : "Ytd", "description" : "Returns a set of elements with a common parent that are located at the same level with this element starting from the first such element and finishing with this element, according to constraints of the Year level in the Time dimension.", "arguments" : "Ytd( [ Member_Expression*] )", "showFullDescriptionLink" : "1", "userFunction" : "0", "calendarFunction" : "0" }, { "category" : "Time", "format" : "", "dontCheckInParser" : "1", "name" : "QTD", "description" : "Returns a set of elements with a common parent that are located at the same level with this element starting from the first such element and finishing with this element, according to constraints of the Quarter level in the Time dimension.", "arguments" : "Qtd( [ Member_Expression ] )", "showFullDescriptionLink" : "1", "userFunction" : "0", "calendarFunction" : "0" }, { "category" : "Time", "format" : "", "dontCheckInParser" : "1", "name" : "MTD", "description" : "Returns a set of elements with a common parent that are located at the same level with this element starting from the first such element and finishing with this element, according to constraints of the Month level in the Time dimension.", "arguments" : "Mtd( [ Member_Expression ] )", "showFullDescriptionLink" : "1", "userFunction" : "0", "calendarFunction" : "0" }, { "category" : "Time", "format" : "", "dontCheckInParser" : "1", "name" : "PARALLELPERIOD", "description" : "Returns the previous period element located in the same relative position with this element. Despite the similarity with the Cousin function, the ParallelPeriod function is closer connected with a time series. The ParallelPeriod function takes ancestor of the specified expression at the specified level, finds sibling of the ancestor, which lags for the specified number of periods, and returns parallel period among the this sibling's children.", "arguments" : "ParallelPeriod( [ Level_Expression [ ,Index [ , Member_Expression ] ] ])", "showFullDescriptionLink" : "1", "userFunction" : "0", "calendarFunction" : "0" }, { "category" : "Time", "format" : "", "dontCheckInParser" : "1", "name" : "PERIODSTODATE", "description" : "Returns a set of elements with a common parent that are located at the same level with this element, according to constraints of the specified level in the Time dimension.", "arguments" : "PeriodsToDate( [ Level_Expression [ ,Member_Expression ] ] )", "showFullDescriptionLink" : "1", "userFunction" : "0", "calendarFunction" : "0" }, { "category" : "Time", "format" : "", "dontCheckInParser" : "1", "name" : "LASTPERIOD", "description" : "Returns a set of element up to the specified element inclusive.", "arguments" : "LastPeriods(Index, [Member_Expression ] )", "showFullDescriptionLink" : "1", "userFunction" : "0", "calendarFunction" : "0" }, { "category" : "Time", "format" : "", "dontCheckInParser" : "1", "name" : "OPENINGPERIOD", "description" : "Returns the first sibling among the specified level children; if required, the element can be specified, which child must be returned.", "arguments" : "OpeningPeriod( [ Level_Expression ] , [ Member_Expression ] )", "showFullDescriptionLink" : "1", "userFunction" : "0", "calendarFunction" : "0" }, { "category" : "Time", "format" : "", "dontCheckInParser" : "1", "name" : "CLOSINGPERIOD", "description" : "Returns the last element among the specified element's children at the specified level.", "arguments" : "ClosingPeriod( [ Level_Expression ] , [ Member_Expression ] )", "showFullDescriptionLink" : "1", "userFunction" : "0", "calendarFunction" : "0" }, { "category" : "Sets", "format" : "", "dontCheckInParser" : "1", "name" : "TOPCOUNT", "description" : "Sorts a set in descending order and returns the specified number of elements with the greatest values.", "arguments" : "TopCount(Set_Expression,Count, [ Numeric_Expression ] )", "showFullDescriptionLink" : "1", "userFunction" : "0", "calendarFunction" : "0" }, { "category" : "Sets", "format" : "", "dontCheckInParser" : "1", "name" : "BOTTOMCOUNT", "description" : "Sorts a set in ascending order and returns the specified number of set's tuples with minimum values.", "arguments" : "BottomCount(Set_Expression,Count, [ Numeric_Expression ] )", "showFullDescriptionLink" : "1", "userFunction" : "0", "calendarFunction" : "0" }, { "category" : "Sets", "format" : "", "dontCheckInParser" : "1", "name" : "CROSSJOIN", "description" : "Returns cross product of two or several sets.", "arguments" : "Standard syntax: Crossjoin(Set_Expression1 ,Set_Expression2 [,...n] ); Alternate syntax: Set_Expression1 * Set_Expression2 [* ...n]", "showFullDescriptionLink" : "1", "userFunction" : "0", "calendarFunction" : "0" }, { "category" : "Sets", "format" : "", "dontCheckInParser" : "1", "name" : "DESCENDANTS", "description" : "Returns a set of element's children at the specified level or distance, if required, including or excluding children at other levels.", "arguments" : "Descendants(Member_Expression , [ Level_Expression] ,Desc_Flag ] ); Descendants(Member_Expression , [Distance ] ,Desc_Flag ] ); Descendants(Set_Expression , [Level_Expression] ,Desc_Flag ] ); Descendants(Set_Expression , [ Distance ], Desc_Flag ] ); Distance - Available numeric expression that specifies distance from the specified element. Desc_Flag** - Available expression string that specifies description of the flag that correlates with possible child sets.", "showFullDescriptionLink" : "1", "userFunction" : "0", "calendarFunction" : "0" }, { "category" : "Sets", "format" : "", "dontCheckInParser" : "1", "name" : "DISTINCT", "description" : "Calculates the specified set and removes repeated tuples from it, returns the output set.", "arguments" : "Distinct(Set_Expression)", "showFullDescriptionLink" : "1", "userFunction" : "0", "calendarFunction" : "0" }, { "category" : "Sets", "format" : "", "dontCheckInParser" : "1", "name" : "EXCEPT", "description" : "Handles two sets and removes tuples from the first set, which exist in the second set, and saves, if required, equal elements.", "arguments" : "Except(Set_Expression1, Set_Expression2, [ ALL ] )", "showFullDescriptionLink" : "1", "userFunction" : "0", "calendarFunction" : "0" }, { "category" : "Sets", "format" : "% ", "dontCheckInParser" : "1", "name" : "EXISTING", "description" : "Specifies that the specified set must be forced calculated in the current context.", "arguments" : "Existing Set_Expression", "showFullDescriptionLink" : "1", "userFunction" : "0", "calendarFunction" : "0" }, { "category" : "Sets", "format" : "", "dontCheckInParser" : "1", "name" : "EXISTS", "description" : "Returns a set of tuples of the first specified set, which appear once or several times in the second set. This function manually executes automatic check operation. If an optional argument is specified [name of group of="" metrics=""], the function returns the tuples that appear once or several times in the second set and contain corresponding strings in the fact table of the specified metric group.", "arguments" : "Exists( Set_Expression1 , Set_Expression2 , [ MeasureGroupName] ); MeasureGroupName - Available string expression that means name of metrics group.", "showFullDescriptionLink" : "1", "userFunction" : "0", "calendarFunction" : "0" }, { "category" : "Sets", "format" : "", "dontCheckInParser" : "1", "name" : "EXTRACT", "description" : "Returns a set of tuples from retrieved hierarchy elements.", "arguments" : "Extract(Set_Expression, Hierarchy_Expression1 [,Hierarchy_Expression2, ...n] ); Hierarchy_Expression - available multidimensional expression that returns hierarchy.", "showFullDescriptionLink" : "1", "userFunction" : "0", "calendarFunction" : "0" }, { "category" : "Sets", "format" : "", "dontCheckInParser" : "1", "name" : "FILTER", "description" : "Returns a set that is resulted after filtering the specified set based on search condition.", "arguments" : "Format(Set_Expression, Logical_Expression ); Logical_Expression - Available multidimensional hierarchy expression that is set to True or False.", "showFullDescriptionLink" : "1", "userFunction" : "0", "calendarFunction" : "0" }, { "category" : "Sets", "format" : "", "dontCheckInParser" : "1", "name" : "GENERATE", "description" : "Applies the set to each element of other set and combines the output sets. As an alternative, this function also returns a combined string created by calculating a string expression by set.", "arguments" : "Generate( Set_Expression1 , Set_Expression2, [ ALL ] ); Generate( Set_Expression1 , String_Expression ,[ Delimiter ] ); Delimiter - Available delimiter as a string expression."", "showFullDescriptionLink" : "1", "userFunction" : "0", "calendarFunction" : "0" }, { "category" : "Sets", "format" : "", "dontCheckInParser" : "1", "name" : "HEAD", "description" : "Returns the specified number of set's first elements and saves repeated elements.", "arguments" : "Head(Set_Expression , [Count ] )", "showFullDescriptionLink" : "1", "userFunction" : "0", "calendarFunction" : "0" }, { "category" : "Sets", "format" : "", "dontCheckInParser" : "1", "name" : "HIERARCHIZE", "description" : "Orders set elements in the hierarchy.", "arguments" : "Hierarchize(Set_Expression ,[ POST ] )", "showFullDescriptionLink" : "1", "userFunction" : "0", "calendarFunction" : "0" }, { "category" : "Sets", "format" : "", "dontCheckInParser" : "1", "name" : "INTERSECT", "description" : "Returns intersection of two input sets, if required, saves repeated elements.", "arguments" : "Intersect(Set_Expression1 , Set_Expression2 ,[ ALL ] )", "showFullDescriptionLink" : "1", "userFunction" : "0", "calendarFunction" : "0" }, { "category" : "Sets", "format" : "", "dontCheckInParser" : "1", "name" : "NONEMPTY", "description" : "Returns a set of non-empty tuples from the specified set based on the direct product of the specified set with the second set.", "arguments" : "NONEMPTY(set_expression1 , [set_expression2])", "showFullDescriptionLink" : "1", "userFunction" : "0", "calendarFunction" : "0" }, { "category" : "Sets", "format" : "", "dontCheckInParser" : "1", "name" : "ORDER", "description" : "Orders specified set's elements, if required, keeps or breaks hierarchy.", "arguments" : "Order(Set_Expression, Numeric_Expression [ , { ASC | DESC | BASC | BDESC } ] ); Order(Set_Expression, String_Expression [ , { ASC | DESC | BASC | BDESC } ] )", "showFullDescriptionLink" : "1", "userFunction" : "0", "calendarFunction" : "0" }, { "category" : "Sets", "format" : "", "dontCheckInParser" : "1", "name" : "TAIL", "description" : "Returns a subset from the set end.", "arguments" : "Tail(Set_Expression [ ,Count ] )", "showFullDescriptionLink" : "1", "userFunction" : "0", "calendarFunction" : "0" }, { "category" : "Sets", "format" : "", "dontCheckInParser" : "1", "name" : "UNION", "description" : "Returns a set resulted from combining of two sets, if required, with saving of repeated elements.", "arguments" : "Union(Set_Expression1, Set_Expression2 [,...n][, ALL]) or Set_Expression1 + Set_Expression2 [+...n] or {Set_Expression1 , Set_Expression2 [,...n]}", "showFullDescriptionLink" : "1", "userFunction" : "0", "calendarFunction" : "0" }, { "category" : "Statistics", "format" : "", "dontCheckInParser" : "1", "name" : "SUM", "description" : "Returns a sum of numeric expression that is calculated by the specified set.", "arguments" : "Sum( Set_Expression [ , Numeric_Expression ] )", "showFullDescriptionLink" : "1", "userFunction" : "0", "calendarFunction" : "0" }, { "category" : "Statistics", "format" : "", "dontCheckInParser" : "1", "name" : "COALESCEEMPTY", "description" : "Transforms values of empty cells into specified no-empty values that can be numbers or strings.", "arguments" : "CoalesceEmpty( Numeric_Expression1 [ ,Numeric_Expression2,...n] ) or CoalesceEmpty(String_Expression1 [ ,String_Expression2,...n] )", "showFullDescriptionLink" : "1", "userFunction" : "0", "calendarFunction" : "0" }, { "category" : "Statistics", "format" : "", "dontCheckInParser" : "1", "name" : "COUNT", "description" : "Returns the number of cells in the set.", "arguments" : "Count(Set_Expression [ , ( EXCLUDEEMPTY | INCLUDEEMPTY ) ] ) or Set_Expression.Count", "showFullDescriptionLink" : "1", "userFunction" : "0", "calendarFunction" : "0" }, { "category" : "Statistics", "format" : "", "dontCheckInParser" : "1", "name" : "DISTINCTCOUNT", "description" : "Returns the number of unequal, non-empty tuples in the set.", "arguments" : "DistinctCount(Set_Expression)", "showFullDescriptionLink" : "1", "userFunction" : "0", "calendarFunction" : "0" }, { "category" : "Statistics", "format" : "", "dontCheckInParser" : "1", "name" : "RANK", "description" : "Returns a range (starting from 1) of the specified tuple in the specified set.", "arguments" : "Rank(Tuple_Expression, Set_Expression [ ,Numeric Expression ] ); Tuple_Expression - Available multidimensional expression that returns tuple.", "showFullDescriptionLink" : "1", "userFunction" : "0", "calendarFunction" : "0" }, { "category" : "Navigation", "format" : "", "dontCheckInParser" : "1", "name" : "ANCESTOR", "description" : "The function that returns an ancestor of the specified element at the specified level or an ancestor that is at the higher level of hierarchy at the specified distance.", "arguments" : "Ancestor(Member_Expression, Level_Expression) or Ancestor(Member_Expression, Distance); Distance - Available numeric expression that specified distance from the specified element.", "showFullDescriptionLink" : "1", "userFunction" : "0", "calendarFunction" : "0" }, { "category" : "Navigation", "format" : "", "dontCheckInParser" : "1", "name" : "ANCESTORS", "description" : "The function that returns a set of specified element's ancestors at the specified level or specified distance from the element. In Microsoft SQL Server Analysis Services the returned set will always contain one element — Analysis Services do not support several parents for one element.", "arguments" : ""Ancestors(Member_Expression, Level_Expression) or Ancestors(Member_Expression, Distance); Distance - Available numeric expression that specifies a distance from the specified element.", "showFullDescriptionLink" : "1", "userFunction" : "0", "calendarFunction" : "0" }, { "category" : "Navigation", "format" : "", "dontCheckInParser" : "1", "name" : "ASCENDANTS", "description" : "Returns a set of parents of the specified element including this element.", "arguments" : "Ascendants(Member_Expression)", "showFullDescriptionLink" : "1", "userFunction" : "0", "calendarFunction" : "0" }, { "category" : "Navigation", "format" : ".%", "dontCheckInParser" : "1", "name" : "CHILDREN", "description" : "Returns a set of specified element's children.", "arguments" : "Member_Expression.Children", "showFullDescriptionLink" : "1", "userFunction" : "0", "calendarFunction" : "0" }, { "category" : "Navigation", "format" : "", "dontCheckInParser" : "1", "name" : "COUSIN", "description" : "Returns a child element, which position relative to the parent element matches the specified child element's position.", "arguments" : "Cousin( Member_Expression , Ancestor_Member_Expression ); Ancestor_Member_Expression - Available multidimensional element expression that returns ancestor element.", "showFullDescriptionLink" : "1", "userFunction" : "0", "calendarFunction" : "0" }, { "category" : "Navigation", "format" : ".%", "dontCheckInParser" : "1", "name" : "CURRENT", "description" : "Returns the current tuple from the set during cycle execution.", "arguments" : "Set_Expression.Current", "showFullDescriptionLink" : "1", "userFunction" : "0", "calendarFunction" : "0" }, { "category" : "Navigation", "format" : ".%", "dontCheckInParser" : "1", "name" : "FIRSTCHILD", "description" : "Returns the first child of the specified element.", "arguments" : "Member_Expression.FirstChild", "showFullDescriptionLink" : "1", "userFunction" : "0", "calendarFunction" : "0" }, { "category" : "Navigation", "format" : ".%", "dontCheckInParser" : "1", "name" : "FIRSTSIBLING", "description" : "Returns the first child of the specified element.", "arguments" : "Member_Expression.FirstSibling", "showFullDescriptionLink" : "1", "userFunction" : "0", "calendarFunction" : "0" }, { "category" : "Navigation", "format" : "", "dontCheckInParser" : "1", "name" : "ISANCESTOR", "description" : "Returns the value that informs whether the specified element is ancestor of other specified element.", "arguments" : "IsAncestor(Member_Expression1, Member_Expression2)", "showFullDescriptionLink" : "1", "userFunction" : "0", "calendarFunction" : "0" }, { "category" : "Navigation", "format" : "", "dontCheckInParser" : "1", "name" : "ISGENERATION", "description" : "Returns the value that informs whether the specified element belongs to the specified generation.", "arguments" : ""IsGeneration(Member_Expression, Generation_Number); Generation_Number - Available numeric expression that specified the generation, for which the specified element is calculated.", "showFullDescriptionLink" : "1", "userFunction" : "0", "calendarFunction" : "0" }, { "category" : "Navigation", "format" : "", "dontCheckInParser" : "1", "name" : "ISLEAF", "description" : "Returns the value that informs whether the element is an end element.", "arguments" : "IsLeaf(Member_Expression)", "showFullDescriptionLink" : "1", "userFunction" : "0", "calendarFunction" : "0" }, { "category" : "Navigation", "format" : "", "dontCheckInParser" : "1", "name" : "ISSIBLING", "description" : "Returns the value that informs whether the specified element has a common parent with other specified element.", "arguments" : "IsSibling(Member_Expression1, Member_Expression2)", "showFullDescriptionLink" : "1", "userFunction" : "0", "calendarFunction" : "0" }, { "category" : "Navigation", "format" : ".%( Cube_Name - Available string value that means cube name.", "showFullDescriptionLink" : "1", "userFunction" : "0", "calendarFunction" : "0" }, { "category" : "Navigation", "format" : ".%", "dontCheckInParser" : "1", "name" : "CURRENTMEMBER", "description" : "Returns the current element of the level containing the specified element.", "arguments" : "Member_Expression.CurrentMember", "showFullDescriptionLink" : "1", "userFunction" : "0", "calendarFunction" : "0" }, { "category" : "Navigation", "format" : ".%", "dontCheckInParser" : "1", "name" : "NEXTMEMBER", "description" : "Returns the next element of the level containing the specified element.", "arguments" : "Member_Expression.NextMember", "showFullDescriptionLink" : "1", "userFunction" : "0", "calendarFunction" : "0" }, { "category" : "Navigation", "format" : ".%", "dontCheckInParser" : "1", "name" : "PREVMEMBER", "description" : "Returns the previous element of the level containing the specified element.", "arguments" : "Member_Expression.PrevMember", "showFullDescriptionLink" : "1", "userFunction" : "0", "calendarFunction" : "0" }, { "category" : "Navigation", "format" : ".%", "dontCheckInParser" : "1", "name" : "SIBLINGS", "description" : "Returns elements that have a common parent with the specified element including this element.", "arguments" : "Member_Expression.Siblings", "showFullDescriptionLink" : "1", "userFunction" : "0", "calendarFunction" : "0" }, { "category" : "My functions", "format" : "", "dontCheckInParser" : "0", "name" : "MyFunc1", "description" : "MyFunc1", "arguments" : "MyFunc1(Input:ITimeSeries, Input1:ITimeSeries, Coef:Double)", "showFullDescriptionLink" : "0", "userFunction" : "1", "calendarFunction" : "0" } ] } } } } }
public static GetFormulaEditorInfoResult GetFunctionList(MbId mb) { var somClient = new SomPortTypeClient(); //Proxy object for operation execution //Operation execution parameters var tGet = new GetFormulaEditorInfo() { tArg = new GetFormulaEditorInfoArg() { pattern = new FormulaEditorInfoPattern() { isRExist = true, userRPath = true, formulaEditorFunctions = FormulaEditorFunctionsType.Adomd } }, tMb = new MbId() { id = mb.id } }; //Get list of functions var result = somClient.GetFormulaEditorInfo(tGet); return result; }
See also: