We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Parse error because the field does not exsit

AU123
5 - Atom

I'm trying to use a formula tool after a transpose tool. The formula tool uses a field which does not exist after the transpose tool, but it may on future runs. Is there a formula I can use to prevent the parse error?

2 REPLIES 2
Deano478
12 - Quasar

@AU123 what is the current formula you are using?

 

I'm just guessing really but you can try this

IF [Name] = "YourFieldName" THEN [Value] ELSE NULL ENDIF

 

ScottLewis
11 - Bolide

There are a few ways to approach this, depending on the particular structure of the fields.

Some of those solution involve additional transpose steps to flatten out the field structure.

 

One we use to maintain structure for unknown fields is to join the output with a text input that has all of the possible fields with a single row of nulls. Then we throw out that row and you're left with your original data with all the expected fields (with null values). Then you can write formulas using the field that may or may not be present and wrap an IsNULL([Mysteryfield]) around them so they produce values either way.

There is also likely some way to do this with conditional execution, but that seems over complicated for the case.

Attaching a simple version of the text input/IsNull() method. If that doesn't help, we'll likely need a more specific picture of what you're trying to do (or possibly do) to zero in on which way to handle the issue.

Labels
Top Solution Authors