title: how to change color of a text item dynamically in d2k forms 6i?
body: <p>I have been trying to change color of a field dynamically based on some conditions but it is not displaying correctly. Here is the code for that button:</p>
  
  <pre><code>DECLARE
      CURSOR DATA IS
      SELECT EMPNO,ENAME,COMM FROM EMP;
  BEGIN
  
      OPEN DATA;
      GO_BLOCK('BLOCK3');
      FIRST_RECORD;
      LOOP
          FETCH DATA INTO :BLOCK3.T_EMPNO, :BLOCK3.T_NAME, :BLOCK3.T_COMM;
  
          EXIT WHEN DATA%NOTFOUND;
  
          IF :BLOCK3.T_COMM IS NULL THEN
              SET_ITEM_instance_PROPERTY('BLOCK3.T_COMM',BACKGROUND_COLOR,'R255G70B70');
          --  message('comm is null');
          ELSE
          SET_ITEM_PROPERTY('BLOCK3.T_COMM',BACKGROUND_COLOR,'R255G100B70');
          --message('comm is not null');
              END IF;
  
          NEXT_RECORD;
      END LOOP;
      FIRST_RECORD;
  
  END;
  </code></pre>
  
  <p>I have also tried to display the messages to see if query is working fine or not. Messages get displayed, but the color doesn't changes. All the fields are the same color.</p>