2

Hi I'm using the this approach https://sharepoint.stackexchange.com/a/118213/53772 to color an field of an list

e.g.

 =IF([Status]="red","<div style='color:red;'>red</div>","error")

which is coloring the text "red" in red. All good so far, but using the filter/sorting property of this column will display the <div style='color:red;'>red</div> insted of a red text. like this: enter image description here

any ideas how to avoid this?

  • Was the answer helpful? If so could you make it disappear from the SO unanswered list by marking it an answer. tnx – Danny '365CSI' Engelman Jun 4 '17 at 7:51
  • Hey did you get the answer? If yes, Please let me know because I am facing same problem. – Shahid Oct 22 at 12:40
1

Not

Note that the link you provide to mess with XSLT in Designer is not required; all you have to do is set the datatype of the Calculated Column to Number

HTML in Calculated Columns works since SP2010, but it is a hack not supported by Mirosoft

Your HTML will show up in plenty more places, see Pros & Cons at http://www.viewmaster365.com/#/How

Your only way out is Client Side Rendering (since SP2013), using JavaScript to only rewrite the output of the Field

See: How does one alter the appearance of a managed metadata value in a list using JSLink?

And be sure to edit that CSR code with the WYSIWYG Cisar Chrome Extension

  • @user2798895 agree with danny so you can do it by using some javascript hack. – SynozeN Technologies May 19 '17 at 8:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.