Skip to main content
Question

If then else on Is Null

  • December 31, 2018
  • 0 replies
  • 27 views

Forum|alt.badge.img+12
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")



Forum|alt.badge.img+12
  • Author
  • Registered
  • December 31, 2018
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")


Forum|alt.badge.img+12
  • Author
  • Registered
  • December 31, 2018
Thanks so much.  That did it.