Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Don't forget to submit your entry for the Excellence Awards by October 30! | Need more information about the program? Check out the blog here
SOLVED

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

Highlighted
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!

Highlighted
ACE Emeritus
ACE Emeritus

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
Highlighted
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.

 

 

Highlighted
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

Highlighted
8 - Asteroid

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

Highlighted
5 - Atom

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. 

Labels