This topic is locked

possible bug with customformat and nulls

6/18/2008 6:04:07 AM
PHPRunner General questions
S
steveh author

I'm using a custom format in the view screen as well as a lookup against a table in the edit screen.
However, the custom format seems to be being skipped when the value is null (e.g. if I set my custom format to be $value='zzz'; for the null values the return is still blank?)
This is with 4.2 build 379
I'm just about to go and look at the codepath to see why this would be.

S
steveh author 6/18/2008

Ok, found the issue, bug in commonfunctions:
This:-
function DisplayLookupWizard($field,$value,&$data, $keylink, $mode)

{

global $conn;

if(strlen($value))

return "";

$LookupSQL="SELECT ";
Needs to be changed to this:-
function DisplayLookupWizard($field,$value,&$data, $keylink, $mode)

{

global $conn;

if(strlen($value))

return GetDataInt($value,$data,$field, Format($field));

$LookupSQL="SELECT ";

J
Jane 6/18/2008

Steve,
thank you for poiting me to this bug.

We'll fix it in the next update.