Home » Developer & Programmer » Forms » Getting a block's rowid
Getting a block's rowid [message #80461] Tue, 24 September 2002 16:47 Go to next message
fokker
Messages: 18
Registered: March 2002
Junior Member
I want to get the current block's rowid. However, i don't know the blocks name until runtime. For instance, if I had two blocks, myblock1, and myblock2, then I can get the name of the current block using :system.current_block. However, the only way to get the current block's id that i know of is to use :myblock1.rowid. So I would have to do something like this:

IF :system.current_block = 'MYBLOCK1' THEN
row_id := :myblock1.rowid;

ELSIF :system.current_block = 'MYBLOCK2' THEN
row_id := :myblock2.rowid;

END IF;

I want to eliminate this redundant code. Is there a way that i could get the current block's rowid without using some kind of long IF THEN statement?
Re: Getting a block's rowid [message #80462 is a reply to message #80461] Tue, 24 September 2002 17:06 Go to previous messageGo to next message
gary
Messages: 35
Registered: January 2001
Member
Use the NAME_IN built in
thanks [message #80463 is a reply to message #80462] Tue, 24 September 2002 18:30 Go to previous message
fokker
Messages: 18
Registered: March 2002
Junior Member
thanks, that worked
Previous Topic: Enter Query, remembering the query ran
Next Topic: Re: Dynamic SQL
Goto Forum:
  


Current Time: Sat Mar 02 11:48:39 CST 2024