Discussions

Expand all | Collapse all

If then else on Is Null

  • 1.  If then else on Is Null

    Posted 12-31-2018 17:42
    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")


  • 2.  RE: If then else on Is Null

    Posted 12-31-2018 17:53
    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")




  • 3.  RE: If then else on Is Null

    Posted 12-31-2018 18:03
    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...


  • 4.  RE: If then else on Is Null

    Posted 12-31-2018 18:07
    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")



  • 5.  RE: If then else on Is Null

    Posted 12-31-2018 18:36
    Thanks so much.  That did it.