Home » Developer & Programmer » Forms » multi record block processing (Forms 6)
multi record block processing [message #401097] Fri, 01 May 2009 10:10 Go to next message
marvSQL
Messages: 13
Registered: February 2008
Location: JAMAICA
Junior Member

i have a multi-record data block that has two fields first_name ,last_name.

so if i want to know for example the value of first_name in the record number 3..

is there any way that i can get the value of any row/record without having to loop trough the block or going directly to the field?





Re: multi record block processing [message #401100 is a reply to message #401097] Fri, 01 May 2009 10:33 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Did you try to go to that record (GO_RECORD built-in) and check item value?
Re: multi record block processing [message #401101 is a reply to message #401100] Fri, 01 May 2009 10:59 Go to previous messageGo to next message
marvSQL
Messages: 13
Registered: February 2008
Location: JAMAICA
Junior Member
thanks Littlefoot for responding so soon

the thing is i didn't want to use the go_record because i didn't want to go to the record i just wanted to grab the value. going to the record will trigger other events that i don't want to be triggered.

i don't know if it cant be done the way i want it to be done

thanks again Littlefoot
Re: multi record block processing [message #401212 is a reply to message #401101] Sat, 02 May 2009 11:36 Go to previous messageGo to next message
klat
Messages: 87
Registered: May 2009
Location: Mumbai
Member

You can use 'rownum' for getting the record .
Re: multi record block processing [message #401216 is a reply to message #401212] Sat, 02 May 2009 13:39 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
How would you write that piece of code that will use ROWNUM and get item value without going to the record?
Re: multi record block processing [message #401226 is a reply to message #401216] Sat, 02 May 2009 20:53 Go to previous messageGo to next message
klat
Messages: 87
Registered: May 2009
Location: Mumbai
Member

add a field ROWNUM to your block .

If you want to go record no 3 write the where clause as :

.. where rownum = 3
Re: multi record block processing [message #401230 is a reply to message #401097] Sat, 02 May 2009 23:51 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>.. where rownum = 3
Above will never be true
Re: multi record block processing [message #401237 is a reply to message #401230] Sun, 03 May 2009 01:58 Go to previous messageGo to next message
klat
Messages: 87
Registered: May 2009
Location: Mumbai
Member

BlackSwan wrote on Sun, 03 May 2009 10:21

Above will never be true

... and why?
Re: multi record block processing [message #401262 is a reply to message #401237] Sun, 03 May 2009 09:02 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Because.

SQL> select * from emp
  2  where rownum = 3;

no rows selected

SQL>

Perhaps you should read documentation about the ROWNUM pseudocolumn and/or search the net (Ask Tom might be a good choice).
Re: multi record block processing [message #401267 is a reply to message #401237] Sun, 03 May 2009 10:43 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
klat wrote on Sat, 02 May 2009 23:58
BlackSwan wrote on Sun, 03 May 2009 10:21

Above will never be true

... and why?


Because 1 never equals 3.
Please prove me wrong; if you can.
Re: multi record block processing [message #401268 is a reply to message #401267] Sun, 03 May 2009 12:26 Go to previous message
klat
Messages: 87
Registered: May 2009
Location: Mumbai
Member

Thanks.

That was a mistake from my part
Previous Topic: Stacked Canvas disappears from Tabbed Canvas
Next Topic: Why I cannot get the item value on tabular layout?
Goto Forum:
  


Current Time: Fri Sep 20 10:49:40 CDT 2024