I need some help creating a calculated field which includes div styles in the formula. I created a list as part of a project in Visual Studio and now I'm creating all the necessary columns including some calculated fields. The formula works if you create a calculated column directly in SharePoint 2013 but the same formula is not working in Visual Studio Community 2015. I was writing the formulas in Scheme.xml.
I'll write an example below:
=IF([CustomField]="","","<DIV style=""text-align:left""><DIV style=""font-weight:bold"">Custom Field</DIV>")
The errors for the formula above are:
DIV - Tag was not closed.
text-align:left - Missing required whitespace and Missing attribute value on attribute 'left'.
font-weight:bold - Missing required whitespace and Missing attribute value on attribute 'bold'.
These kind of formulas are working perfectly when you are creating calculated columns directly in SharePoint but not in Visual Studio. Did someone had similar experience with that. I am new in Visual Studio.
Thanks in advance and best regards.