Skip to main content

FormulaValidationErrorResponse

Errors that were detected in the input for creating or updating a formula.

typestringrequired
Constant value: formula_validation_error
Default value: formula_validation_error
name objectrequired

Name of the formula. Optional parameter.

anyOf
string
labelError objectrequired

Error detected with the label of a formula to be created or updated. Absent if the label is valid.

type stringrequired

Error detected with the label of a formula to be created or updated. Absent if the label is valid.

Possible values: [name_already_exists, name_reserved, total_cost_formula_already_exists]

object
expressionErrors object[]required

Errors detected in the expression of a formula to be created or updated. Empty if the expression is valid.

  • Array [
  • oneOf

    The expression contains references to columns or formulas that are invalid.

    typestringrequired
    Constant value: invalid_reference
    Default value: invalid_reference
    location objectrequired

    Location of the error in the formula. If none, the parser wasn't able to locate the position of the error.

    anyOf

    Represents the location of an error in a formula.

    startPosintegerrequired

    Start position of the error in the formula.

    Possible values: >= 0

    endPosintegerrequired

    End position of the error in the formula.

    Possible values: >= 1

    referenceTypestringrequired

    The kind of reference that failed to resolve.

    Possible values: [column, custom_benchmark, round]

    Default value: column
    referenceName objectrequired

    The name of the reference that is invalid.

    anyOf
    string
  • ]
  • FormulaValidationErrorResponse
    {
    "type": "formula_validation_error",
    "name": "string",
    "labelError": {
    "type": "name_already_exists"
    },
    "expressionErrors": [
    {
    "type": "invalid_reference",
    "location": {
    "startPos": 0,
    "endPos": 0
    },
    "referenceType": "column",
    "referenceName": "string"
    },
    {
    "type": "multiple_volumes_in_total_cost"
    },
    {
    "type": "invalid_syntax"
    },
    {
    "type": "cyclic_reference"
    },
    {
    "type": "mult_price_by_price",
    "location": {
    "startPos": 0,
    "endPos": 0
    }
    },
    {
    "type": "mult_vol_by_vol",
    "location": {
    "startPos": 0,
    "endPos": 0
    }
    },
    {
    "type": "division_by_variable",
    "location": {
    "startPos": 0,
    "endPos": 0
    }
    },
    {
    "type": "missing_price_in_total_cost"
    },
    {
    "type": "missing_volume_in_total_cost"
    },
    {
    "type": "missing_price_volume_multiplication_in_total_cost"
    },
    {
    "type": "volume_in_total_cost_aggregate",
    "location": {
    "startPos": 0,
    "endPos": 0
    },
    "operator": "string"
    },
    {
    "type": "volume_in_if_condition",
    "location": {
    "startPos": 0,
    "endPos": 0
    }
    },
    {
    "type": "comparison_in_arithmetic_expression",
    "location": {
    "startPos": 0,
    "endPos": 0
    }
    },
    {
    "type": "blank_in_comparison",
    "location": {
    "startPos": 0,
    "endPos": 0
    },
    "operator": "string"
    },
    {
    "type": "different_types",
    "location": {
    "startPos": 0,
    "endPos": 0
    },
    "operator": "string",
    "types": [
    "volume"
    ]
    },
    {
    "type": "different_types_in_ifs",
    "location": {
    "startPos": 0,
    "endPos": 0
    },
    "operator": "string",
    "types": [
    "volume"
    ]
    },
    {
    "type": "if_condition_not_boolean",
    "location": {
    "startPos": 0,
    "endPos": 0
    }
    },
    {
    "type": "non_boolean_in_logical_expression",
    "location": {
    "startPos": 0,
    "endPos": 0
    },
    "operator": "string"
    },
    {
    "type": "non_numeric_in_aggregate_expression",
    "location": {
    "startPos": 0,
    "endPos": 0
    },
    "operator": "string"
    },
    {
    "type": "non_numeric_in_arithmetic_expression",
    "location": {
    "startPos": 0,
    "endPos": 0
    }
    },
    {
    "type": "ref_component_is_hidden",
    "componentName": "string"
    },
    {
    "type": "visible_formula_contains_supplier_name_column",
    "supplierNameColumnName": "string"
    },
    {
    "type": "named_formula_is_not_price"
    },
    {
    "type": "unexpected_token",
    "location": {
    "startPos": 0,
    "endPos": 0
    },
    "unexpectedToken": "string"
    },
    {
    "type": "invalid_character",
    "location": {
    "startPos": 0,
    "endPos": 0
    },
    "invalidCharacter": "string"
    },
    {
    "type": "subformula_with_volume_in_total_cost",
    "location": {
    "startPos": 0,
    "endPos": 0
    }
    },
    {
    "type": "unsupported_column_type",
    "location": {
    "startPos": 0,
    "endPos": 0
    },
    "columnName": "string"
    },
    {
    "type": "expression_fill_in_changes_column_type",
    "expectedType": "string",
    "actualType": "string"
    },
    {
    "type": "invalid_number_of_arguments_in_if",
    "location": {
    "startPos": 0,
    "endPos": 0
    },
    "numArgsFound": 0
    },
    {
    "type": "invalid_number_of_arguments_in_ifs",
    "location": {
    "startPos": 0,
    "endPos": 0
    },
    "numArgsFound": 0
    },
    {
    "type": "missing_default_branch_in_ifs",
    "location": {
    "startPos": 0,
    "endPos": 0
    }
    },
    {
    "type": "sourced_reference_not_allowed",
    "location": {
    "startPos": 0,
    "endPos": 0
    }
    },
    {
    "type": "benchmark_reference_not_allowed",
    "location": {
    "startPos": 0,
    "endPos": 0
    }
    }
    ]
    }