Forum Discussion

JoanneWong's avatar
JoanneWong
Qrew Member
5 years ago

Dynamic rule setting for rich text field

Hi Quick Base Community! I'm trying to set up a dynamic rule for the following condition:

When [Status] equals to "Renew", show [Has a renewal audit been scheduled?]

[Status] is a formula rich text field and has the following formula:
If(([When does the accreditation expire?]<Today()),"<div style=\"background-color:red;width:10\">Expired</div>", ToDays([When does the accreditation expire?]-Today())<=90,"<div style=\"background-color:yellow;width:10\">Renew</div>", ToDays([When does the accreditation expire?]-Today())>90,"<div style=\"background-color:lightgreen;width:10\">OK</div>")

The rich text formula field doesn't seem to work in dynamic rule. Appreciate if someone can shine some lights on this. Thanks!


------------------------------
Joanne Wong
------------------------------
  • I suggest making a status field in plain text and then a separate formula field to display that as Rich Text.

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------
    • JoanneWong's avatar
      JoanneWong
      Qrew Member
      Thanks Mark. I tried what Evan suggested and it worked.

      ------------------------------
      Joanne Wong
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend
        Yes I can work, but then if you change the styling of the status field you will break the form rule.  I prefer to have a cleaner status field and then have a formula which display it in a fancier way.  for example if you want to filter a report for a certain status or to have Dynamic Filters on a report, then only having a Rich text status field is very messy.  They really will not work for a DF, for example as all that code will be exposed to the user.

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

    The issue you are running into is probably because as a formula rich text field it doesn't have just a text value in the field to match against. Have you tried setting it so when Status is equal to ""<div style=\"background-color:yellow;width:10\">Renew</div>"" and including the full way you are styling the text for the check? 

    ------------------------------
    Evan Martinez
    Community Marketing Manager
    Quick Base
    ------------------------------
    • JoanneWong's avatar
      JoanneWong
      Qrew Member
      Thanks Evan. I did but the dynamic rule is still not working.

      ------------------------------
      Joanne Wong
      ------------------------------
      • EvanMartinez's avatar
        EvanMartinez
        Quickbase Staff
        Hi Joanne,

        Yeah the form rules aren't really set to mesh with formula rich text fields as they pull in different values. They often function best as ways to stylize text over as a component of workflow. Another way to do this is to create a plain formula text field in the background that has the same formula but returns only text and have it hidden doing the work of running your form rule along side the stylized text.

        ------------------------------
        Evan Martinez
        Community Marketing Manager
        Quick Base
        ------------------------------