Forum Discussion

ConsueloViramon's avatar
ConsueloViramon
Qrew Member
2 years ago

IF condition in Text field

Hi there, 

I have a [B!T Client Rating] Text field, it can contain numbers 1 to 5 or it can contain stars, so *, **, ***, ****, or *****. So I want to unify and convert the stars to numbers. I created a Formula text field and I put the following:

if([B!T Client Rating] = "*",1, [B!T Client Rating])
if([B!T Client Rating] = "**",2, [B!T Client Rating])
if([B!T Client Rating] = "***",3, [B!T Client Rating])
if([B!T Client Rating] = "****",4, [B!T Client Rating])
if([B!T Client Rating] = "*****",5, [B!T Client Rating])

It doesn't like the = in the first line. It says: "The operator "=" can't be applied on type numbers, text".

Any ideas? Thanks!!





------------------------------
Consuelo Viramonte
------------------------------

2 Replies

  • MarkShnier__You's avatar
    MarkShnier__You
    Qrew #1 Challenger
    Try this

    IF(
    [B!T Client Rating] 
    = "*",        "1",
    [B!T Client Rating] = "**",       "2",
    [B!T Client Rating] = "***",     "3",
    [B!T Client Rating] = "****",   "4",
    [B!T Client Rating] = "*****",  "5", [B!T Client Rating])

    If that does not work please post your formula and the complete error message.

    ------------------------------
    Mark Shnier (Your Quickbase Coach)
    mark.shnier@gmail.com
    ------------------------------
    • ConsueloViramon's avatar
      ConsueloViramon
      Qrew Member
      Thanks! it has worked!

      ------------------------------
      Consuelo Viramonte
      ------------------------------