Hiding elements in detail table

What javascript code would I use to hide the barcode in a detail table if the barcode value is empty?
Attaching a picture of the output I get now, using a script on the barcode object that includes a condition.

My code looks like this:

results.each(function(index) {
if(record.tables["leftCol"][index].fields["left_128ABarcode"] !== "undefined")
{
	var field, result = "";
	
	field = record.tables["leftCol"][index].fields["left_128ABarcode"];
	if (field !== "")
	{
	 result += field;
	}
	
	
	this.text(result);
}
else
{
 this.attr("data-conditional", "");
 this.hide();
}
});

I believe you’re going to want to select the barcode object and set the CSS Display property to none, as below:

1 Like

Thanks! using the css display property as ‘none’ did the trick!