This topic is locked

Reference to primary value in custom code

11/14/2006 8:14:05 AM
PHPRunner General questions
Pfeiffer author

Hello,
how can I get the value of the primary key of a record while custom code is passed.
Example :

Table billing field Primary key billing_id

date_bill date of bill

order_value numeric
In custom code of field order_value I want to change the field colour to red if date_bill is older than 30 days.

How can I refer to the field value of date_bill or billing_id in the source code of

custom code for field order_value in list view ??
Best regards

Uwe Pfeiffer

Alexey admin 11/14/2006

Uwe,
use $data array to access other field values.

Here is the sample code

global $data;

$value=$value." - ".$data["billing_id"];