cancel
Showing results for 
Search instead for 
Did you mean: 

If In Then Question Part II!

former_member406941
Participant
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

abhilash_kumar
Active Contributor

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

Answers (4)

Answers (4)

former_member292966
Active Contributor

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

former_member406941
Participant
0 Kudos

"Default Values For Nulls" did the trick. 🙂

former_member406941
Participant
0 Kudos

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"; 
former_member406941
Participant
0 Kudos

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