Q:

Is there a way to prevent invalid row range in powerbuilder

Is there a way to prevent invalid row range in powerbuilder. 
IF  dw_lista_campanias. GetSelectedRow(0) > 0 AND    dw_lista_campanias.object.est_camp[dw_lista_campanias. GetRow()] = 'EO020' THEN

when dw_lista_campanias.object.est_camp index is 0 an exception is throw.  

Invalid row range at line 193 in ue_opcion4 event of object w_os0210_mantenimiento_campanya. 

A:

Change your codes as below:
IF dw_lista_campanias. ROWCOUNT() > 0 THEN
        IF  dw_lista_campanias. GetSelectedRow(0) > 0 AND  dw_lista_campanias.object.est_camp[dw_lista_campanias. GetRow()] = 'EO020' THEN
//PUT YOUR CODE HERE
END IF
END IF
Happy coding ( from pb developer :) )

