Skip to main content
Question

Single vs doule quotes in RIch Text Formulas

  • February 17, 2021
  • 0 replies
  • 61 views

Forum|alt.badge.img+14
Is there an easy explanation for how/when to use double quotes vs single quotes in Formula Rich Text fields?

Or are there too many possibilities and it is something I will need to find an entire web page on and learn about?

------------------------------
Mike Tamoush
------------------------------

Double quotes are used with you start and stop a 'literal'. Essentially, when you're telling the formula to use this piece of information exactly. Single quotes are used when you need to insert certain parts of code within that literal. For example, you want to setup a link to some website. The URL is www.my-website.com.

In a RT Formula, you would do this:
"<a href='www.my-website.com'>Click ME</a>"

Another example. You want to write a message in Comic Sans font that includes the status of a record. For this, you would do something like this:
"<span style='font-family:Comic_Sans'>Status: " & [Status] & "</span"

Normally, you would write it as:
<span style="font-family:Comic_Sans">

But, since the formula requires the use of double quotes to use code, the interior double quotes get changed to single quotes.

------------------------------
Blake Harrison
bharrison@datablender.io
DataBlender - Quickbase Solution Provider
Atlanta GA
404.800.1702 / http://datablender.io/
------------------------------