Home » Developer & Programmer » Forms » system generated number
system generated number [message #421048] Thu, 03 September 2009 20:46 Go to next message
yjOy
Messages: 8
Registered: May 2008
Junior Member
hi! i am new to oracle form builder..
can anyone help me how to create a system generated number?

For example:

The GPP No. is system generated when cursor is moved down.It automatically puts a number, say 1 on the text item..

hope you could help me..

thanks.
Re: system generated number [message #421060 is a reply to message #421048] Fri, 04 September 2009 00:44 Go to previous messageGo to next message
Littlefoot
Messages: 20825
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
What exactly do you call a "system generated number"? (By the way, what is a "GPP No."?)

You could use a sequence (a database object) to generate a number; you can also use, for example, :SYSTEM.TRIGGER_RECORD system variable. There are a few possibilities, but I guess that you should first provide some more details.
Re: system generated number [message #421977 is a reply to message #421048] Sat, 12 September 2009 11:07 Go to previous messageGo to next message
Kevin Meade
Messages: 2098
Registered: December 1999
Location: Connecticut USA
Senior Member
This has always been a difficult problem. You need to think more about what you want. In particular think about these two things:

1) does your form application actually have to generate the number, or can you let the database do it?

2) what is the number for? Does your form even need to know the number exists at all?

3) what do you do with removed/deleted rows. Let us say your user creates rows 1,2,3 in the form. They look at it then decide to remove row 2. Should row 3 be renumbered to 2?

It is not an easy thing though I am sure there is someone who knows exactly how to do it.

Good luck, Kevin
Re: system generated number [message #422029 is a reply to message #421977] Sun, 13 September 2009 19:28 Go to previous message
yjOy
Messages: 8
Registered: May 2008
Junior Member
hi. thanks a lot littlefoot and Kevin.

I've been having a hard time deciding on what
to do with the number either to make it system generated
or just let the user enter the numbers. However, thanks for your
replies..it helped me a lot.
Previous Topic: Invoking mail from Forms 6i by user login
Next Topic: Database block on remote view on remote database
Goto Forum:
  


Current Time: Mon Sep 26 14:33:49 CDT 2016

Total time taken to generate the page: 0.14606 seconds