cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to create a formula that looks at different criteria and it is not working, seems to be evaluating the first part of the formula

cothmer
Participant
0 Kudos

({CLARITY_EDG.REF_BILL_CODE} in ["800" to "904.9"] or {CLARITY_EDG.REF_BILL_CODE} in ["925" to "929.9"] or

{CLARITY_EDG.REF_BILL_CODE} in ["940" to "959.9"] or

{CLARITY_EDG.REF_BILL_CODE} in ["994.0", "994.1","994.7","994.8"] or

{CLARITY_SER.PROV_ID} in ["1021", "1072", "1107", "1211", "1358", "6518"] or

{ZC_DISCH_DISP.DISCH_DISP_C} in ["8","40","41","42"] or

{ZC_DISCH_DISP.DISCH_DISP_C} = "2" or

{ZC_ADM_SOURCE.ADMIT_SOURCE_C} = "4"

Accepted Solutions (0)

Answers (1)

Answers (1)

DellSC
Active Contributor
0 Kudos

If it's possible that any of the fields will contain null values, then you'll need to take that into account.  You can do one of two things:

1.  In the Formula Editor, set it to use "Defaults for Nulls" in the top right.

2.  Account for the nulls in your formula like this:

(not IsNull({CLARITY_EDG.REF_BILL_CODE}) and

  ({CLARITY_EDG.REF_BILL_CODE} in ["800" to "904.9"] or

   {CLARITY_EDG.REF_BILL_CODE} in ["925" to "929.9"] or

   {CLARITY_EDG.REF_BILL_CODE} in ["940" to "959.9"] or

   {CLARITY_EDG.REF_BILL_CODE} in ["994.0", "994.1","994.7","994.8"])) or

(not IsNull({CLARITY_SER.PROV_ID}) and

  {CLARITY_SER.PROV_ID} in ["1021", "1072", "1107", "1211", "1358", "6518"]) or

(not IsNull({ZC_DISCH_DISP.DISCH_DISP_C}) and

  {ZC_DISCH_DISP.DISCH_DISP_C} in ["2","8","40","41","42"]) or

(not IsNull({ZC_ADM_SOURCE.ADMIT_SOURCE_C}) and

  {ZC_ADM_SOURCE.ADMIT_SOURCE_C} = "4")

Notice where I've put the parentheses - it won't work without them!

-Dell