TeamDesk Knowledge Base & Support

   Home      FAQ      Forum      Idea Exchange      Ask a Question      My Stuff      Help   
Formula - XHTML
We could simply add an "Allow HTML" flag to Formula - Text columns but in this case you'll need to:
1. Perform encoding of the text by hand - call HTMLEncode() function or something
2. We can't validate the result whether the formula produces valid HTML markup - one mistake and the output will be broken beyond repair.

To cope with these problems some bits of special syntax could help:

<span style=" <% If([Priority]="High", "color:red") %> ">
<% [Priority] %>

"Code points" are designated with <%...%>. The result of the code point is an encoded text.

Whatever placed outside of the code points considered XHTML code - we'll perform validation on it.

With this, you can solve field colorization task as well as many others: produce links with dynamic content, present compact value to the user and provide details via tooltips, add third party visualization components etc.

Kirill Bondar  Staff 
Date Created
3/3/2010 2:50:37 AM
Date Updated
2/2/2015 7:58:21 AM
Promoted By
Grant SimmonsbasenineFCI ADMIN
Stephen WeltyGii SystemsDave Ellis
beoAnatoliy ZachynskiyJan Paul Roetenberg
chris dagesseLiquid RapidRick Cogley
Flavia CalhelhawalhhornAlfredo Bravo
Ben FatchenKirill Bondar  Staff Frédérik_Dussault
Philipp Matuschka (MMB)mark gardinerClaus Weisenberger
Franz SimonKevin SmithMatthew Porter
Christof SulzerPhilippe
Anthony CarterMatan BarneaFranck Assouline
Kevin Bishop
Kevin Bishop 6/13/2007 3:18:14 AM
It would be very useful to be able to change the background colour of a field, based on it's contents. i.e. if field value is less than 10, display in red.
basenine 4/23/2009 12:24:33 AM
Definitely... Even if it just changed the value, not the background
Franz Simon 7/13/2009 3:19:50 PM
Yes please, give us just a little bit of conditional formatting. If a follow up date is today or older than today, mark it red so it is spotted immediately.
walhhorn 3/2/2010 3:25:35 PM
It seems that this could be implemented using similar logic to what is found in the existing row colorization option available in tables and views.
basenine 3/2/2010 3:35:11 PM
"Definitely... Even if it just changed the value, not the background"

What I meant here was .... even if the **_colour_**of the value changed!
Kirill Bondar  Staff  3/4/2010 3:01:38 PM
Sure, this idea is fully covered by Formula - XHTML
Liquid Rapid 7/14/2010 11:25:51 AM
This is a great idea - it would be really useful!
Rick Cogley 12/8/2010 3:52:32 PM
I can think of many interesting things to do with this.
Kirill Bondar  Staff  1/24/2011 9:38:57 AM
Merged with:
135 - Field Colourization
Kirill Bondar  Staff  1/27/2011 8:12:16 AM
Liquid Rapid 1/27/2011 11:00:58 AM
Nice! I'm looking forward to using this.
Grant Simmons 1/27/2011 11:04:42 AM
Is there a way to change the background color of the cell?
Kirill Bondar  Staff  1/27/2011 11:16:00 AM

<div style="<% If([Condition], "background:red", "")%>"><%=[Value]%></div>

or something alike.
Liquid Rapid 2/21/2011 1:28:19 PM
Is there any way to make this work in a concatenated Summary column?

If the Concatenate function used a <br /> tag as the separator, that would be perfect.

Here's what I'm trying to do:
I have a database of visits to hospitals. I'd like to create a stacked list of people who have visited the hospital, with contact info on each item. Like this:

John Smith - 123-456-7890 -
Jane Summers - 098-765-4321 -

Where the email address is a mailto link.

I've created the Formula XHTML column on the user table which constructs the above string with a mailto link around the email address. But when I then concatenate that Formula XHTML column, the HTML is displayed as text. Like this:
<span>John Smith</span><span> - 123-456-7890</span><span><a href="mailto:"></a></span>
Liquid Rapid 2/21/2011 1:40:03 PM
Sorry, the concatenation does indeed work with my XHTML column. It produces a comma-separated list. I forgot that I had this wrapped with a Formula Text column - that clearly won't work.

What I'd like is to take that comma-separated list and make into a stacked list, separated by line breaks. With all the HTML intact.
Slava Shinderov  Staff  2/2/2015 7:58:21 AM
Today, we've added new option for Text/Formula – Text columns – colorization bases on whether the value contains certain text:
Back to Search Results