Discussions

Expand all | Collapse all

Dynamic rule setting for rich text field

  • 1.  Dynamic rule setting for rich text field

    Posted 13 days ago
    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
    ------------------------------


  • 2.  RE: Dynamic rule setting for rich text field

    Posted 13 days ago
    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
    ------------------------------



  • 3.  RE: Dynamic rule setting for rich text field

    Posted 13 days ago
    Thanks Mark. I tried what Evan suggested and it worked.

    ------------------------------
    Joanne Wong
    ------------------------------



  • 4.  RE: Dynamic rule setting for rich text field

    Posted 13 days ago
    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
    ------------------------------



  • 5.  RE: Dynamic rule setting for rich text field

    Posted 13 days ago
    Got it. Thanks for the pointer! I'll keep that in mind.

    ------------------------------
    Joanne Wong
    ------------------------------



  • 6.  RE: Dynamic rule setting for rich text field

    Posted 13 days ago
    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
    ------------------------------



  • 7.  RE: Dynamic rule setting for rich text field

    Posted 13 days ago
    Thanks Evan. I did but the dynamic rule is still not working.

    ------------------------------
    Joanne Wong
    ------------------------------



  • 8.  RE: Dynamic rule setting for rich text field

    Posted 13 days ago
    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
    ------------------------------



  • 9.  RE: Dynamic rule setting for rich text field

    Posted 13 days ago
    Thanks Evan. Actually I tried it again and it worked! There was probably an error in the formula I put in. Thanks for your help!

    ------------------------------
    Joanne Wong
    ------------------------------