Skip to main content

FormulaValidationErrorResponse

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

typeTyperequired
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 Typerequired

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
    typeTyperequired
    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
    startPosStartposrequired

    Start position of the error in the formula.

    Possible values: >= 0

    endPosEndposrequired

    End position of the error in the formula.

    Possible values: >= 1

    referenceTypeReferencetyperequired

    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
    }
    }
    ]
    }