Re: Custom LOV in QUERY mode (Forms 3)

From: Jeff Busch <68a869_at_llnl.gov>
Date: 1995/11/08
Message-ID: <47qqdm$jov_at_lll-winken.llnl.gov>#1/1


In article k58_at_news.sas.ab.ca, dmacpher_at_sas.ab.ca (Dave Macpherson) writes:
>I have coded a custom LOV lookup as a callable form that is called
>from a KEY-LISTVAL trigger. As you all know though, key triggers are
>not called when in QUERY mode.
>
>The usual way around this is to code a LOV query that forces an error,
>such as "select sum(dummy) from dual", whose error you can trap in a
>form-level ON-ERROR trigger, and you can issue the form call from
>within this trigger.
>
>This USED TO WORK, but after having upgraded to SQL*Forms 3.0.16 and
>RDBMS 7.1.16, all I get now is a blank LOV window. Does anybody know
>what I have to do to get back this functionality? We have TONS of code
>that uses this technique.
>

Suggestion: Remove the LOV text from the field and use the following on-message trigger

   DEFINE TRIGGER

      NAME = on-message
      TRIGGER_TYPE = V3
      TEXT = <<<
      declare var_msg varchar2(80);
      begin
        if MESSAGE_CODE = 41800 and :system.cursor_field = 
           'YOUR_BLOCK.YOUR_FIELD' then
          call('YOUR LOV FORM');
        else
           var_msg := MESSAGE_TYPE || '-' ||
            to_char(MESSAGE_CODE) || ': ' || MESSAGE_TEXT;
           message(var_msg);
        end if;
      end;
      >>>

---
Jeff Busch             Internet busch1_at_llnl.gov
Voice (510) 423-9134 Fax (408) 263-1360 Received on Wed Nov 08 1995 - 00:00:00 CET

Original text of this message