Why does my cursor jump back to the beginning?

From: Wim Valgaeren <valgaeren_at_softhome.net>
Date: Thu, 4 Nov 1999 08:38:42 -0000
Message-ID: <7vrcpk$o8e$1_at_naxos.belnet.be>



This piece of code is in my when-timer-expired trigger. It supposes to fill out the companyname when typing the first few characters in enter-query-mode.
It works fine until I type in a space, because then the cursor jumps back to the beginning of the text-item. Does anyone know why it does that? The problem is when I put :clients.companyname or :system.cursor_value in the code. Even in an IF block where he doesn't come in.

If you know the answer to this, please let me know. Thanks in advance,

Wim Valgaeren

DECLARE
  counter NUMBER:= 0;
BEGIN
  IF (:system.cursor_item = 'CLIENTS.COMPANYNAME' AND :system.mode = 'ENTER-QUERY') THEN

     SELECT count(*)
      INTO counter
      FROM clients
      WHERE upper(companyname) like upper(:system.current_value) || '%';

    IF (counter = 1) THEN
       SELECT companyname
       INTO :clients.companyname
       FROM clients
       WHERE upper(companyname) like upper(:system.current_value) || '%';

SET_ITEM_INSTANCE_PROPERTY('clients.companyname',current_record,visual_attri
bute,'va_normal');
      do_key('execute_query');

    END IF;
    IF (counter = 0) THEN

SET_ITEM_INSTANCE_PROPERTY('clients.companyname',current_record,visual_attri bute,'va_not_found');

    ELSE SET_ITEM_INSTANCE_PROPERTY('clients.companyname',current_record,visual_attri bute,'va_enter_query');

    END IF;
  END IF;
END; Received on Thu Nov 04 1999 - 09:38:42 CET

Original text of this message