Skip to Content

If In Then Question Part II!

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Best Answer
    Oct 23, 2017 at 05:09 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 20, 2017 at 10:52 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 23, 2017 at 03:14 PM

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

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 23, 2017 at 04:05 PM

    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"; 
    Add comment
    10|10000 characters needed characters exceeded

  • Oct 23, 2017 at 07:11 PM

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

    Add comment
    10|10000 characters needed characters exceeded