Problem in template transform condition

how to remove new line if condition is not true