ALTERYX INSPIRE | Join us this May for for a multi-day virtual analytics + data science experience like no other! Register Now
2 Day Countdown - The Alteryx Community will be temporarily unavailable for a few hours due to scheduled maintenance starting on Thursday, April 22nd at 5pm MDT. Please plan accordingly.

Alteryx Designer Knowledge Base

Definitive answers from Designer experts.

Parse Error at char (n): Unknown variable "[variable_name]" Expression (#n)

Alteryx_KB
Alteryx
Alteryx
Created

Environment Details


  • Alteryx Designer
    • All versions
  • Tools Impacted
    • Dynamic Rename
    • Filter
    • Formula
    • Multi-Row Formula


Cause


Something changed in the metadata, and the field/ column [variable_name] is no longer available, i.e.: the variable being used to create a formula is missing or has not yet been created.



Resolution


Breaking down the error message, Parse Error at char (6) tells you exactly where the issue is: it starts at the sixth character in (Expression #1). Remembering that Alteryx Designer is 0-based, start counting at zero.

 

Designer uses brackets to identify variables, therefore, in the formula [x1]+[x2], the sixth character is the x at the beginning of variable [x2] which is the variable in question. Another hint is that the text color of variable [x2] is black, indicating that it is not a recognized variable name.

 

From here, trace backwards from the erroring tool to find out where the column went “missing.” For example, [variable_name] may have been renamed in a Select tool upstream or deselected in an intermediate tool.

 

When building a formula or using functions, verify that all string values are in quotes. Ensure variable names doesn't have leading or trailing spaces, [ variable_name] or [variable_name ]. Do not use brackets in variable names. These types of errors are especially common in nested conditional statements.