Help Highlighting a table cell based on two table row values

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], &nbsp; &nbsp;value = arguments[1],<br />&nbsp; &nbsp;$ = skuid&#46;$;<br />&nbsp; &nbsp;&nbsp;<br />if(field&#46;metadata&#46;accessible){ <br />&nbsp; &nbsp; if(value === "MQL - Customer/W Oppty"){<br />&nbsp; &nbsp; &nbsp; &nbsp; &#47;&#47;RED&nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; field&#46;element&#46;css({'background-color':'#ff0000','min-height':'10px','text-align':'center'});<br />&nbsp; &nbsp; } <br />&nbsp; &nbsp; if(value === "Passed to Sales"){<br />&nbsp; &nbsp; &nbsp; &nbsp; &#47;&#47;GREEN&nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp;field&#46;element&#46;css({'background-color':'#00cc00','min-height':'10px','text-align':'center'});<br />&nbsp; &nbsp; } <br />&nbsp; &nbsp; else if(value === "Qualifying" ){<br />&nbsp; &nbsp; &nbsp; &nbsp; &#47;&#47;YELLOW&nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp;field&#46;element&#46;css({'background-color':'#ffff00','min-height':'10px','text-align':'center'});<br />&nbsp; &nbsp; } <br />&nbsp; &nbsp; &nbsp;skuid&#46;ui&#46;fieldRenderers[field&#46;metadata&#46;displaytype][field&#46;mode](field,value);<br />}&nbsp;

Josef,

You can get the other field’s value using something like this:

&nbsp;(field.model.getFieldValue(field.row,'my_value2__c',true) 


Your ‘if’ would look like:

if(value === "Passed to Sales" &amp;&amp; (field.model.getFieldValue(field.row,'my_value2__c',true)) { 


Look here for an example of a custom field render that calculates a total:

http://community.skuid.com/skuid/topics/row_action_with_inline_snippet_to_update_field

Thanks,

Bill

<br>