Forum Discussion

CarolMcconnell's avatar
CarolMcconnell
Qrew Captain
7 years ago

If then else on Is Null

I have the following formula in a Formula Text field.  I know who to make this work in Visual Basic but having trouble in Quickbase.  Can someone assist in the correct layout?

If (not IsNull([Pend on Date Assigned to]) and IsNull ([Pend off Date Assigned to]) "Pending", If(not IsNull([Pend on Date Transferred to]) and IsNull ([Pend off Date Transferred to]) "Pending", If (not IsNull ([Pend On Date ReOpened By])and IsNull([Pend Off Date ReOpened by]), "Pending","Open")
  • Note that you cannot use IsNull to test a text field and I do not know what field types there are you are testing.  But assuming they are not text fields

    If(not IsNull([Pend on Date Assigned to]) and IsNull([Pend off Date Assigned to]) "Pending",

    not IsNull([Pend on Date Transferred to]) and IsNull([Pend off Date Transferred to]) "Pending",

    not IsNull([Pend On Date ReOpened By]) and IsNull([Pend Off Date ReOpened by]), "Pending",

    "Open")


  • Thanks.  I'm getting a syntax error.

    Please check the syntax of your formula. Look for mismatched parentheses, missing quotes, or extra brackets.


    If(not IsNull([Pend on Date Assigned to]) and IsNull([Pend off Date Assigned to])   "Pending",
    not IsNull([Pend on Date Transferred to]) and IsNull([Pend off Date Transferred to]) "Pending",
    not IsNull([Pend On Date ReOpened By]) and IsNull([Pend Off Date ReOpened by]), "Pending",
    "Open")


    More on syntax errors...
  • Sorry, I was missing commas

    If(not IsNull([Pend on Date Assigned to]) and IsNull([Pend off Date Assigned to]), "Pending", 

    not IsNull([Pend on Date Transferred to]) and IsNull([Pend off Date Transferred to]), "Pending", 

    not IsNull([Pend On Date ReOpened By]) and IsNull([Pend Off Date ReOpened by]), "Pending",

    "Open")