Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Formula Error: The field "" is not contained in the record

Empower49
8 - Asteroid

Hello community. I'm trying to do something very simple, if a field is null, I want to replace is with the values from 2 other fields. I receive the following error:  The field "" is not contained in the record.

 

Here's the expression:

 

IF IsNull([EXT_TRADE_ACCT_NBR         ])

THEN [ID2        ], [ID]

ELSE "ok"

ENDIF

 

Thanks for your help!

6 REPLIES 6
Claje
14 - Magnetar

Hi,

Based on this formula, I'm not 100% sure whether you want to replace the value with a combined version of the two other fields, or if you want to replace with ID2, and if there is no ID2, use ID instead.

I wrote up a revised formula for each of these options.  Let me know if this matches your expectation, or if there is something else you are trying to do!

 

//Combines ID2 and ID

IF IsNull([EXT_TRADE_ACCT_NBR         ])

THEN [ID2        ]+ [ID]

ELSE "ok"

ENDIF
//Chooses ID2, and defaults to ID if it is null

IF IsNull([EXT_TRADE_ACCT_NBR         ])

THEN 
            IF ISNULL([ID2        ])
            THEN [ID]
            ELSE [ID2        ]
            ENDIF
ELSE "ok"

ENDIF
Empower49
8 - Asteroid

Thank you for your reply!  I am trying to combine ID2 and ID if the value is null, so your first example below is very helpful. Even using the plus sign (great suggestion!), I still receive the error message. Do you have any additional advice? Thank you.

 

 

mtakka1
7 - Meteor

And 'The field "" is not contained' error might be because you have not selected a field in the formula tool or a name is not given to the new field

Empower49
8 - Asteroid

I figured it out! Problem solved by reformatting the output column name.  :-)

susan3344
6 - Meteoroid

this helped me. i had my formula right but i missed entering the new column name. it gave me the error. after i gave it a column name, the error went away. 

jacobthomas
5 - Atom

I ran into a similar issue. The problem was not the formula. The problem was I inadvertently had an output column with no name and a space in the formula box(see attached BMP). It was minimized so I didn't see it for a bit.

Labels