Turns out, a well placed ternary operator was the answer. The following appears to work:
public function data() {
$data = new dataObjectSet();
foreach(Value in my Array) {
$row = array(
'varaible1' => $StaticText,
'variable2' => ($TextOrNULL == "") ? false : $TextOrNULL, //<--if NULL instead of text, change to boolean 'false'
));
$data = push(new arrayData($row));
}
return $data;
}
Which works fine with what I already have:
<table>
<% control data %>
<tr>
<td>$variable1</td> <!--always present-->
</tr>
<% if variable2 %> <!--if false, don't show the table row, proceed if has content-->
<tr>
<td>$variable2</td>
</tr>
<% end_if %>
<% end_control %>
</table>
Funny, I thought non-boolean objects equate to false by default?