HTML in Calculated Fields

Did you know that you can put HTML and CSS code into calculated fields and it displays the field content as HTML in lists and libraries!

The trick is to simple. Set the calculated field setting to NUMBER!

The data type returned from this formula is: “Number”


=CONCATENATE("<span style="background-color: #b3b3b3; border: 4.5px solid #CCC; text-align: center; padding: 2px;">TEXT</span>")

Example button with hyperlink:

=CONCATENATE("<DIV style='background-color:#B3B3B3;border: 4.5px solid #CCC; text-align: center; padding: 2px;'><a href='",[FIELD NAME WITH LINK PATH],"' target='_blank' style='{color: #900}; :link {background: #ff0}; :visited {background: #fff}; :hover {outline: thin red solid};:active {background: #00f}; text-decoration: none; font-weight:bold;'>TEXT</a></DIV>")

Is this Pages usefull? Usefull Useless 0 of 0 people say this Pages is usefull.