Skip to main content
Question

How to create an IF statement like in a list

  • June 15, 2017
  • 0 replies
  • 84 views

Forum|alt.badge.img+12
I need to say if ([Status]= "smith" or 'George" or "brown", last name, first name)

Here is a link to formula help
https://login.quickbase.com/db/6ewwzuuj?a=q&qid=1000080

Here is the help for the IF https://login.quickbase.com/db/6ewwzuuj?a=dr&r=cm&rl=dvn

In your example since you are testing against just 1 field you can also use the Case function

https://login.quickbase.com/db/6ewwzuuj?a=dr&r=ei&rl=dvy

Forum|alt.badge.img+12

I had already looked at all of the If statements and didn't find one that would work in my situation.  I had used one that works in excel using the If(OR but I kept getting syntax errors.  I just used case and this is my formula

Case([Status],"Contracted",Contracted,"Contracted Extend",Contracted,"Location Contracted",Contracted,"Location Contracted Extend",Contracted,[Status])

I am getting a this error.

Formula syntax error

The argument list of the function Contracted must begin with a left parenthesis.


Case


Try this

I suggest a vertical format for readability


Case([Status],
"Contracted","Contracted",
"Contracted Extend","Contracted",
"Location Contracted","Contracted",
"Location Contracted Extend","Contracted",
    [Status])

Forum|alt.badge.img+12

Well, the issue was that I didn't have "" around the 2nd part of each.  The formula I looked at didn't have them, so I assumed they were not suppose to be there but when I used them they work.