Forum Discussion

MeaganMcOlin's avatar
MeaganMcOlin
Qrew Trainee
3 years ago

Formula Error Message

I *think* I have a formula written for my needs (I am very new to this), however when I try to insert it I receive a error message.

Screenshoots attached as well.

Formula: 

If(IsNull([Appointment Scheduled]) and ToDays(Today() - [Appointment Needed By]) >=1 , "<span style=\"color:#ff0707; font-weight:bold\">"&"OverDue"&"</span>" )
If(IsNull([Appointment Scheduled]) and ToDays(Today() - [Appointment Needed By]) >=-7 , "<span style=\"color:# FFDD33; font-weight:bold\">"&"Upcoming"&"</span>" )
If(not(IsNull([Appointment Needed By])),$green,

Error Message: 

There are extra characters beyond the end of the formula



------------------------------
Meagan McOlin
------------------------------

6 Replies

  • This should be a field on the table as a Rich text fomrula field and not a Custom data rule.

    Try this to fix the formula.

    If(
    IsNull([Appointment Scheduled]) and ToDays(Today() - [Appointment Needed By]) >=1 , "<span style=\"color:#ff0707; font-weight:bold\">"&"OverDue"&"</span>" ,

    IsNull([Appointment Scheduled]) and ToDays(Today() - [Appointment Needed By]) >=-7 , "<span style=\"color:# FFDD33; font-weight:bold\">"&"Upcoming"&"</span>" 
    )


    // I left out the last part of the formula as it was incomplete.

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------
    • MeaganMcOlin's avatar
      MeaganMcOlin
      Qrew Trainee

      Mark, 

      Now I'm going to ask what is probably a ovbious question, but where do I find the Rich text fomrula field?



      ------------------------------
      Meagan McOlin
      ------------------------------
      • MichaelTamoush's avatar
        MichaelTamoush
        Qrew Captain
        When you create a field (just like when you created [Appointment Scheduled], if you keep scrolling down the list of options, you will see a big selection of formula fields available. Formula Rich Text is one of the options!

        ------------------------------
        Mike Tamoush
        ------------------------------
    • MeaganMcOlin's avatar
      MeaganMcOlin
      Qrew Trainee

      This has been very helpful! Unfortunately I am now receveing a new error message: 

      Field [Appointment Scheduled] is not identified



      ------------------------------
      Meagan McOlin
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend
        I'm not sure what field type Appointment Scheduled is, but it must be a separate field from this Rich Text formula field.  That is because a formula field cannot refer to itself. 

        So two separate fields.  One for the data entry and a Rich text formula field one to colorize it.

        ------------------------------
        Mark Shnier (YQC)
        Quick Base Solution Provider
        Your Quick Base Coach
        http://QuickBaseCoach.com
        mark.shnier@gmail.com
        ------------------------------