Home » Developer & Programmer » Forms » Generating sequence in Oracle forms (6i)
Generating sequence in Oracle forms [message #536535] Wed, 21 December 2011 06:36 Go to next message
Tomcrzy
Messages: 101
Registered: December 2011
Location: Chennai,India
Senior Member

Hi friends,

Before i am going to the topic wish you a very advanced X'mass and New Year .
The issue here is ,i want to get serial numbers in oracle forms
i have one data block with 10 rows and a non database display item with corresponding length as that of the original data block .
when ever i am executing the form i want to see the serial number generated in the display item and when i inserted a new item or row it should show the corresponding rownum.


eg:

empno name serialno
5 tom 1
4 tinil 2
6 sofy 3
7 john 4
1 albert 5
2 michel 6

i want to get the above answer using forms
can anyone please help me.
Re: Generating sequence in Oracle forms [message #536536 is a reply to message #536535] Wed, 21 December 2011 06:48 Go to previous messageGo to next message
Littlefoot
Messages: 21813
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Try to set SERIALNO to :SYSTEM.TRIGGER_RECORD in both POST-QUERY and WHEN-CREATE-RECORD triggers.
Re: Generating sequence in Oracle forms [message #536539 is a reply to message #536536] Wed, 21 December 2011 06:55 Go to previous messageGo to next message
Tomcrzy
Messages: 101
Registered: December 2011
Location: Chennai,India
Senior Member

Is this help me to produce serial no inside in a non database display item .
Re: Generating sequence in Oracle forms [message #536542 is a reply to message #536539] Wed, 21 December 2011 07:01 Go to previous messageGo to next message
cookiemonster
Messages: 13925
Registered: September 2008
Location: Rainy Manchester
Senior Member
Yes. Why don't you try it?
Re: Generating sequence in Oracle forms [message #536549 is a reply to message #536542] Wed, 21 December 2011 07:32 Go to previous messageGo to next message
Tomcrzy
Messages: 101
Registered: December 2011
Location: Chennai,India
Senior Member

Thank u its working
Re: Generating serial number in Oracle forms [message #545727 is a reply to message #536535] Thu, 01 March 2012 23:31 Go to previous messageGo to next message
Mishaque
Messages: 2
Registered: March 2012
Location: Lahore
Junior Member
i have to put a serial no in detail block. for that i used to put a text box (non databse item) and make its datatype to Number and Calaulation mode to formula and set formula as :system.trigger_record. It works fine in all of my other forms.
Re: Generating serial number in Oracle forms [message #546034 is a reply to message #545727] Sun, 04 March 2012 15:58 Go to previous messageGo to next message
owais_baba
Messages: 289
Registered: March 2008
Location: MUSCAT
Senior Member
For saqi.it22 take no-database field sno in detail block change the code as per your requirement i could change but u have to try.


decide your trigger key-next-item
  declare 
      a number;
  begin
      a:=1;
  while :empno is not null loop
     :sno:=a;
        a:=a+1;
          next_record;
   end loop;
end;



  • Attachment: SERIAL.FMB
    (Size: 44.00KB, Downloaded 1661 times)

[Updated on: Sun, 04 March 2012 16:05]

Report message to a moderator

Re: Generating serial number in Oracle forms [message #546035 is a reply to message #546034] Sun, 04 March 2012 17:09 Go to previous message
owais_baba
Messages: 289
Registered: March 2008
Location: MUSCAT
Senior Member
for you i have done it download Cool

Previous Topic: skipping other when validate trigger
Next Topic: How to Assign Value to Parent form from Child Form (3 Merged)
Goto Forum:
  


Current Time: Sat Jul 06 00:09:29 CDT 2024