Help Highlighting a table cell based on two table row values

edited August 30, 2017 in Questions
I am using the snippet below to highlight table cell values based on the value of that cell. Is it possible to extend the if statement to also look at another set of values from a different table column? 

so if value === "my value" AND value2 === "my value2"
var field = arguments[0],    value = arguments[1],
   $ = skuid.$;
    
if(field.metadata.accessible){
    if(value === "MQL - Customer/W Oppty"){
        //RED 
        field.element.css({'background-color':'#ff0000','min-height':'10px','text-align':'center'});
    }
    if(value === "Passed to Sales"){
        //GREEN 
       field.element.css({'background-color':'#00cc00','min-height':'10px','text-align':'center'});
    }
    else if(value === "Qualifying" ){
        //YELLOW 
       field.element.css({'background-color':'#ffff00','min-height':'10px','text-align':'center'});
    }
     skuid.ui.fieldRenderers[field.metadata.displaytype][field.mode](field,value);

Comments

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!