Cloud
Облачный сервис для быстрого и эффективного анализа и визуализации данных для вашего бизнеса без необходимости создания своих приложений и программирования.
StiFunctions becomes available in the dashboard designer's expression editor, alongside the built-in ones.public static decimal MySum(object value)
{
if (!ListExt.IsList(value))
return StiValueHelper.TryToDecimal(value);
return Funcs.SkipNulls(ListExt.ToList(value)).TryCastToDecimal().Sum();
}Register it in the static constructor.StiFunctions.AddFunction(
"MyCategory", "MySum", "description",
typeof(DesignerController), typeof(decimal),
"Calculates a sum of the specified set of values.",
new[] { typeof(object) }, new[] { "values" }, new[] { "A set of values" }
).UseFullPath = false;StiFunctions.AddFunction(...) — registers the method with its category, return type, argument types and help text.UseFullPath = false — lists the function by name without the category prefix in the expression editor.