This topic is locked

Previsualization in switch sentence

10/9/2009 1:05:17 PM
PHPRunner General questions
B
bmurillo author

Hi
I have a "status" field with 4 values it change his color in the visual editor with this code:
switch ($value) {

case 1:

$value= "<font color='red'>Open</font>";

break;

case 2:

$value= "<font color='orange'>Asiggned</font>";

break;

case 3:

$value= "<font color='green'>Solved</font>";

break;

case 4:

$value= "<font color='gray'>Closed</font>";

break;

}
Adittionally each one has his table with data inside, that is showed in ajax with a master-detail inclusion, now i want that if the status is open it just show the ajax control in the case 1 value add the control {$ver_asignacion_dtablelink_attrs}>Asiggned{BEGIN ver_asignacion_childcount}({$ver_asignacion_childnumber}), but hace error, how can i do this.
Thanks

J
Jane 10/12/2009

Hi,
use List page: After record processed event to show or hide detail links.

Here is just a sample:

if ($data["status"]==1)

$record["ver_asignacion_dtable_link"] = false;
B
bmurillo author 10/12/2009

Hi,
Thank for the response, i adapted to my needs, and it work perfectly, again, thanks Jane