I have followed the JavaScript examples from here to change the colour in a view: [https://docs.knack.com/docs/javascript-jquery-examples]
Example from the Knack website is:
// Replace view_1 and field_2 with your view and field keys
$(document).on(‘knack-view-render.view_1’, function(event, view, data) {
$(“#view_1 td.field_2”).each(function() {
// #ff0000 is red and the #1c631f is green
var textColor = ($(this).find(“span”).text().trim() == “Expired”) ? “#ff0000” : “#1c631f”;
$(this).css(“color”, textColor);
})
});
Below is what I have modified to (just replacing view_1, field_2, and “Expired” with the relevant text):
// Replace view_1 and field_2 with your view and field keys
$(document).on(‘knack-view-render.view_85’, function(event, view, data) {
$(“#view_85 td.field_192”).each(function() {
// #ff0000 is red and the #1c631f is green
var textColor = ($(this).find(“span”).text().trim() == “Update Profile with missing info”) ? “#ff0000” : “#1c631f”;
$(this).css(“color”, textColor);
})
});
This isn’t working … Does anyone know if the format has changed since these examples were added?