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!
Solved! Go to Solution.
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
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.
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
I figured it out! Problem solved by reformatting the output column name. :-)
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.
User | Count |
---|---|
17 | |
15 | |
15 | |
8 | |
6 |