Forum Discussion

AdamKeever1's avatar
AdamKeever1
Qrew Commander
6 years ago

Formula Rich Text and Formula URL Syntax

Is there a guide available for the correct syntax for the formula URL and formula Rich Text fields?

I cannot find any resources other than bits & pieces from various community posts.
  • Is there something specific you're looking for? 

    Formula URL buttons need to return with a single URL - it can be dynamic like all formulas - but the actual value needs to be an exact URL

    Formula rich text is pretty wide open. You can put simple styling for text, or have <a> tags, make pretty styling elements or images. A lot of HTML is available within reason - so its hard to give a blanket answer for what you can do with it

    A formula-rich text can be a substitute for a formula url using and <a> tag is one way to think about this, but a formula-url can't do what rich text can and is limited to only returning a URL.

    Chayce Duncan | Director of Strategic Solutions
    (720) 739-1406 | chayceduncan@quandarycg.com
    Quandary Knowledge Base
  • Not at the moment. I would just like to have a resource with a table of contents and/or index and/or search function to go to rather spending the time reviewing posts to see if they are applicable or not.
  • I have an app in the exchange called Formula URLs buttons for Dummies. It may help if you have not seen it.

    When it comes to. Generalized button to do a single URL and then refresh the curr3nt page, the Syntax us this fir the refresh

    "javascript:" &
    "$.get('" &
    $URL &
    "',function(){" &
    "location.reload(true);" &
    "});"
    & "void(0);"

    If you want to execute a single URL and have a quiet pop up without a refresh, then use this syntax

    "javascript:" &
    "$.get('" &
    $url &
    "',function(){" &
    "$.jGrowl('This Item has been put on PO CANCEL snooze', {life: 5000, theme: 'jGrowl-green'});" &
    "});" &
    "void(0);"

    I know for sure all the above works.

    I have a note of a post actually by Chayce, that this syntax works but I don�t know that I�ve tested it.

    "javascript: {" &
    "$.get('" & $DeliveryDateInOS & "');" &
    "$.get('" & $PickUpDateInOS & "');" &
    "$.get('" & $ProcessRec & "');" &
    "location.reload();" &  ;
    "}"

    I�m not aware of any other official documentation on how to string together multiple API calls in a low tech simple formula button. We all just keep a collection of tips and tricks.

    Kirk Trachy has a great app called Magic buttons he updates every few months, so you should keep downloading that one event few months and delete you old copy.

    Lastly, at the recent MPower meeting there was an app posted by actually someone who is quite new to Quick Base as a Quick Base employee and she collected about 50 tips from various internal brainiacs at QuickBase.

    She plans to keep collecting tips and add them to this EOTI app.

    https://team.quickbase.com/db/bpj7nsk3j

    Hope this all help you or others who stumble across this post.
    • AdamKeever1's avatar
      AdamKeever1
      Qrew Commander
      Thanks Mark. Greatly appreciate your feedback.
    • TateForgey's avatar
      TateForgey
      Qrew Assistant Captain
      I love the reload functionality and use it frequently in Formula URL fields, but I have spent longer than I would like to admit trying to get it to work when formatted as a link in a Formula Rich Text field.  Is that even possible?

      ------------------------------
      Tate Forgey
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend
        Try this Syntax. In this example the button is toggling a checkbox field to the opposite state.

        var bool NewToggle = not [Completed?];

        var text URL = URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&rid=" & [Record ID#]
        & "&_fid_6=" & $NewToggle;

        var text Words = [Account Name];


        var text URL =
        "javascript:" &
        "$.get('" &
        $URL &
        "',function(){" &
        "location.reload(true);" &
        "});"
        & "void(0);";

        "<a href=\"" & $URL &"\"" & ">" & $Words & "</a>"

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