Hi
Since upgrading to PHPMaker 2020 when I list fields from a database when the field actually has no value PHPMaker is displaying 0.00 - can i set this so nothing is displayed if the field is empty
Regards
John B
Hi
Since upgrading to PHPMaker 2020 when I list fields from a database when the field actually has no value PHPMaker is displaying 0.00 - can i set this so nothing is displayed if the field is empty
Regards
John B
From the source code, if you specifically set up format as “Number” in View Tag, the field will be formatted. If you do not need to always format, you may try the setting “None” (float number will still be formatted with the default decimal precision).
Thanks, I see the logic but Ideally still want nothing displayed if the source is Null could I write something that could go in
Code (Server Events,Clients Scripts, and Custom Templates)
which would say something like <If a Field is Null then Display “”>
Regards
John B
You may use Row_Rendered server event (see the topic Server Events and Client Scripts in the help file) e.g.
if ($this->MyField->DbValue === NULL) $this->MyField->ViewValue = “”;
Thank you - works a treat
Regards
John B