hi,
my aim is to colorize the background of a cell depending of the value of a lookup table.
i have this main table PERSONS :
id_person
name_person
category_person
and i have also this lookup table CATEGORIES:
id_category
name_category
color_category (contenaing a rgb color value)
in my function ListOptions_Rendered , i already access to the value of category_person with with code :
$this->category_person->CurrentValue
but i need the color associated with this id !
but how can i have the (color_category ->CurrentValue ) without doing a sql query ? does phpmaker already load in memory the content of the lookup table in an object ?
maybe phpmaker have a way to do something like :
mycolor=$object_categories (filter on id= $this->category_person->CurrentValue ) ->color_category>getvalue ?
maybe the lookup table is in a array ? with keyaccess from code ?
As my view display 50 items or more, i can’t afford to make 50 sql query !
Thank you for your tips again !