Re: stupid go_record question

From: Matt B. <mcb_at_ds.znet.com>
Date: Tue, 23 Jan 2001 21:06:32 -0800
Message-ID: <t6sohr9f4lim31_at_corp.supernews.com>


"Lesley Boughner" <lesley_at_vimich.com> wrote in message news:94kpu702d0k_at_enews1.newsguy.com...
> I just want to navigate to a specific record without changing the
 default_where of the block.
> Can I do this with go_record?

Yes.

>Can I find the record number of a record without actually having my cursor on
it? (eg. system.trigger_record or system.cursor_record).

No.

However nothing will stop you from "capturing" it and storing it from later use.

Create a control block with a control item that will be your record number. On POST-QUERY or WHEN-NEW-RECORD-INSTANCE or whatever appropriate trigger, capture it.

Like say on POST-QUERY if a record meets certain conditions, then store the number for later use:

IF <my conditions are true> THEN

   MY_BLOCK.MY_CONTROL_ITEM := :SYSTEM.CURSOR_RECORD; END IF; Same should work for WHEN-NEW-RECORD-INSTANCE (if a user actually navigated to the record).

Then later (when ready to go to that record) just do this:

IF :MY_BLOCK.MY_CONTROL_ITEM > 0 THEN
   GO_RECORD(:MY_BLOCK.MY_CONTROL_ITEM);    IF NOT FORM_SUCCESS THEN
      RAISE FORM_TRIGGER_FAILURE;
   END IF;
END IF; -Matt Received on Wed Jan 24 2001 - 06:06:32 CET

Original text of this message