Thursday, April 9, 2009

Display a 0 value

In Xataface, if the column in the database is of integer type and the row has a 0 value in that column then it would be displayed in the view tab. Normally this isn't a problem and actually nice because then it won't clutter up the screen. But sometimes you actually need to display this 0 value. To solve this, you can just use the field__htmlValue function to override the default function execution:



Here we have this field called 'single_conference_delay' which signifies how long it will take before the conference starts. And it's important to specify if it starts immediately like 0 days. This code will display it.

No comments: