Environment: Sharepoint 2013, using a Sharepoint list
Have a simple JSLink script located in ~site/Style Library/JSLink/ that applies coloring to a specific list field (RAG Status) depending on its value:
(function () {
var columnCtx = {};
columnCtx.Templates = {};
columnCtx.Templates.Fields = {
"RAG_x0020_Status":
{
"View": DisplayApprovalStatus
}
};
SPClientTemplates.TemplateManager.RegisterTemplateOverrides(columnCtx);
}) ();
var green="<span style='color:#01DF3A'>Green</span>";
function DisplayApprovalStatus(ctx) {
var columnValue = ctx.CurrentItem.RAG_x0020_Status;
var statusIndicator = "";
if (columnValue == "(1) Green")
statusIndicator = green;
return statusIndicator;
}
This script works when I load the site, but when others load it from within the same org, it doesn't render at all, instead leaving the same "(1) Green" rather than a green-colored "Green".
I have checked and several testers have the same permission levels for the sharepoint site as I do. Any ideas to get this working globally would be appreciated!
<script>
tags and putting the script into a Script Editor WP, it worked the way it was supposed to. Seems to indicate something with the script location or access permissions to me. Not the ideal answer, but it works for the time being.