Skip to Content
0

If In Then Question Part II!

Oct 20, 2017 at 10:21 PM

45

avatar image

Here's what I have:

If {Field 1} in ['72148','73221']

or

{Field 2} in ['72148','73221']

Then

"MRI"

else if {Field 1} in ['73700','73200']

Then

"CT"

The problem is that "CT" is not displaying. Currently the display when {Field 1} is 73700 or 73200 is blank. I want it to display "CT". Please help!

Thanks, Rich

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

5 Answers

Best Answer
Abhilash Kumar
Oct 23, 2017 at 05:09 PM
1

Hi Rich,

Open the formula and look for a drop-down on the top that says 'Exceptions for Nulls'. Set that to 'Default Values for Nulls'.

-Abhilash

Share
10 |10000 characters needed characters left characters exceeded
Brian Dong Oct 20, 2017 at 10:52 PM
1

Hi Rich,

Your formula seems to work for me. The only thing I changed were to change your apostrophe to quotes.

You could be getting nulls because there are NULLs in your data. You can check for nulls like:

If Not IsNull({Field 1}) in ["72148","73221"] 
or
Not IsNull({Field 2}) in ["72148","73221"]
Then 
    "MRI" 
else if {Field 1} in ["73700","73200"] 
    Then 
        "CT"; 

Thanks,

Brian

Share
10 |10000 characters needed characters left characters exceeded
Rich Fobes Oct 23, 2017 at 03:14 PM
0

Thank you Brian!

I'm still showing blanks instead of "CT". It works when I remove: or {Field 2} in ['72148','73221']

so I'm wondering if I need to put parentheses somewhere. I've been trying not no luck.....

Thank you again for your time and help!!

Share
10 |10000 characters needed characters left characters exceeded
Rich Fobes Oct 23, 2017 at 04:05 PM
0

Actually Brian...........I cannot get your formula to work. I get the message "a boolean array is required here" and it has the ["72148","73221"] highlighted.....

If Not IsNull({Field1}) in ["72148","73221"] 
or Not IsNull({Field2}) in ["72148","73221"]
Then"MRI" 
elseif {Field1} in ["73700","73200"] 
Then"CT"; 
Share
10 |10000 characters needed characters left characters exceeded
Rich Fobes Oct 23, 2017 at 07:11 PM
0

"Default Values For Nulls" did the trick. :)

Share
10 |10000 characters needed characters left characters exceeded