private IEnumerable <FunctionInfo> GetFormulaFunctions(ForecastColumn column)
        {
            var settings  = column.GetColumnSettings <FormulaSetting>();
            var formula   = settings.SummaryValue ?? settings.Value ?? new FormulaItem[0];
            var functions = FormulaUtilities.GetFunctions(formula);

            return(functions);
        }
        public ConfigurationServiceResponse GetIsValidColumn(Guid columnTypeId, string settings, FormulaSettingType type = FormulaSettingType.Default)
        {
            var response = new ConfigurationServiceResponse();

            if (columnTypeId.Equals(ForecastConsts.FormulaColumnTypeId))
            {
                var forecastColumn = new ForecastColumn {
                    Settings = settings
                };
                var formulaSetting = forecastColumn.GetColumnSettings <FormulaSetting>();
                var isValid        = IsFormulaInColumnValid(formulaSetting, type);
                response.Success = isValid;
                if (!isValid)
                {
                    var message = UserConnection.GetLocalizableString(LczResourcesSchemaName, "FormulaNotValidMessage");
                    response.ErrorInfo = new ErrorInfo {
                        Message = message
                    };
                }
            }
            return(response);
        }
 private IEnumerable <FormulaItem> GetFormulaItems(ForecastColumn column)
 {
     return(column.GetColumnSettings <FormulaSetting>().Value ?? new FormulaItem[0]);
 }