How can I highlight a table row if a cell is blank?

  • 1
  • Question
  • Updated 3 years ago
This is closely related to this posting from awhile back.  

I am able to successfully get a table row to be highlighted based on a specific cell value.  However, I am unable to get a table row to highlight when a cell value is blank.  

Here is my snippet:

var field = arguments[0], 

value = skuid.utils.decodeHTML(arguments[1]); 

skuid.ui.fieldRenderers[field.metadata.displaytype][field.mode](field,value); 

if (field.mode == 'read' && value === "" ) 

    { 

        field.item.element.addClass("LeadTab_highlighted-row");


    }
Again, this works just fine if I put a value in the " value === "" " segment, so I know my css is correct.  I'm sure I'm making a very basic mistake but I know very little about javascript.  

Thanks!

Gary
Photo of Gary Bailey

Gary Bailey

  • 1,628 Points 1k badge 2x thumb
  • indifferent

Posted 3 years ago

  • 1
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
You could try (field.mode == 'read' && !value)