Announcement

Collapse
No announcement yet.

traffic ligths images in grid doesnt appear

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • traffic ligths images in grid doesnt appear

    Hello,

    Im creating traffic lights on my grid acording a column name Dias, this column is the difference between one date and the system date.

    i setup an event OnRecord with the code below, the images are saved in a folder inside the project.

    Code:
    $Days = {Dias};
    
    if ($Days <= 8) {
    	{Semaforo} = '<img src="../imagenes/verde.png"/>';} 
    
    elseif ($Days > 9) {
    	{Semaforo} = '<img src="../imagenes/rojo.png"/>';}
    
    else {
    	{Semaforo} = '<img src="../imagenes/amarillo.png"/>';}

    But the problem is it works only in some rows not in al the grid, see the image

    semaforo.png

    Can anyone help me to figure it out why the other lines dont display the image?

    by the way the field in the gried is Text, i tried with HTML image and Image file name and never work

    Thank you

  • #2
    There is an option in grids not to show repeated values for a field. Since it seems it's showing lights only when they change, maybe you have selected that option for the semaforo field.

    Comment

    Working...
    X