Hello I’v made this formula and it is function goodÂ
IF[Befristet von]=””,””,“Befristet von: “&TEXT[Befristet von],”dd.mm.yyyy”))&” “&IF[Befristet bis]=””,””,“Befristet bis: “&TEXT[Befristet bis],”dd.mm.yyyy”)) |
I want to have BOLD letters this in calculated formÂ
Why this formula is not function?
=IF[Befristet von]=””,””, “<DIV style=’font-weight:bold’>“Befristet von: “</DIV>”&TEXT[Befristet von],”dd.mm.yyyy”))&” “&IF[Befristet bis]=””,””,”Befristet bis: “&TEXT[Befristet bis],”dd.mm.yyyy”))
Thank you!
1. Have you set the datatype to Number? Single-line-of-text will NOT output your Formula as HTML
2. When you inspect the HTML that is created you will see the style is formatted wrong because the single quotes you added make your style defintion one string.
Replace the single quotes with 2x a double qoute; this is the SharePoint escape notation to get one double  quote in a SharePoint string.
(be carefull with copy pasting code from blogs; they might use the wrong ACSII notation for quote characters; when in doubt replace all quotes in a text-editor)
=IF[Befristet von]="","","<DIV style=""text-align:left;font-weight:bold"">Befristet von: </DIV>" &TEXT[Befristet von],"dd.mm.yyyy")) &" " &IF[Befristet bis]="","","Befristet bis: " &TEXT[Befristet bis],"dd.mm.yyyy"))
3. Because the datatype is number the DIV is right aligned; so I added the text-align:left
you might want to add a min-width as well to prevent wrapping…Â
4. This works in any View, NOT on the Edit/Display Forms, where the bare HTML will be shown. You can prevent Calculated Columns to show up on Forms by not adding them to the Lists ContentTypes; or use SharePoint Designer to hide the Calculated Column of a ContentType
Hi
use Sharepoint Designer ( which is free and easy to use ) to create your own customized views
I am new on sharepoint so I don’t get it what you think.
Thank youÂ
Hi
You should customize how it will looks the results, not the formula. I recomment you to customize the page/form instead the formula.