Show null values as null in list

PHPM2020 / postgreSQL

Hi all, I am having issues showing null numeric values as it shows as 0.00 and confuses with actual values where 0 could be a valid value (rainfall for example)

I have tested different formats but all show a value of 0 where there should be an empty space or a dash - for example.

If I see the data in the DB it is null.

thanks

You may use Row_Rendered server event, see the topic Server Events and Client Scripts in the help file.

Hi I was able to show the null value using DBValue changing directly the phpfn code. but I would like to do it via a server event in the phpmaker project… I was not able to see how to do it in the Row_Rendered. could you guide me on it?

thanks

It should be something like:

if (is_null($this->Field->CurrentValue)) {
$this->Field->ViewValue = “null”;
}

Or, you may simply use:

if (empty($this->Field->CurrentValue)) {
$this->Field->ViewValue = “null”;
}