Home » Developer & Programmer » Forms » How to generate the auto serial no in forms for database items? (merged)
How to generate the auto serial no in forms for database items? (merged) [message #188754] Mon, 21 August 2006 08:33 Go to next message
amul
Messages: 252
Registered: April 2001
Location: Chennai
Senior Member
Hi All,
How to generate the serial no(Non Database Item) for recods(When u inserting or Querying).
Consider below product table ->

Prod_Code Prod Desc
001 T.V
002 FRIDGE

I'm going to queriyng(May be Multiple Records(Grid) or Individual Item ) this records thru forms

so it is showing as

S.No Prod_Code Prod_Desc
1 101 T.V
2 102 FRIDGE


If anybody have idea on this,pls let me know.....


Cheers
Amul

[Updated on: Mon, 21 August 2006 08:36]

Report message to a moderator

How to generate the auto serial no in forms for database items? [message #188868 is a reply to message #188754] Tue, 22 August 2006 04:15 Go to previous messageGo to next message
amul
Messages: 252
Registered: April 2001
Location: Chennai
Senior Member
Hi All,

I've Prod_Table
fields are

Prod_Code Prod_Desc
001 MIXE
002 A/C

This fields are showing in form

S.No Product.Code Product.Desc
1 001 MIXE
2 002 A/C

Requirement:
When ever fetching or inserting the records it should populate with serial no.....(it suit for Multirecords(Grid) also)....
Any Boady have idea on this,pls let me know


How to generate the auto serial no in forms for database items? [message #188871 is a reply to message #188754] Tue, 22 August 2006 04:19 Go to previous messageGo to next message
amul
Messages: 252
Registered: April 2001
Location: Chennai
Senior Member
Hi All,

I've Prod_Table
fields are

Prod_Code Prod_Desc
001 MIXE
002 A/C

This fields are showing in form

S.No Product.Code Product.Desc
1 001 MIXE
2 002 A/C

Requirement:
When ever fetching or inserting the records it should populate with serial no.....(it suit for Multirecords(Grid) also)....
Any Boady have idea on this,pls let me know


Regds
Amul


Re: How to generate the auto serial no in forms for database items? [message #189380 is a reply to message #188871] Thu, 24 August 2006 06:23 Go to previous messageGo to next message
rana.irfan@arzootex.com
Messages: 15
Registered: June 2006
Location: Faisalabad.
Junior Member

hi,

write TRIGGER at Block Level.

PRE-INSERT

begin
Select Max(Prod_Code),0) + 1 Into Column_Name i.e :SrNo
From Prod_Table;
end;

Regards,

Rana Irfan
Generation of auto serial no's on a non base table item in forms 10g [message #189392 is a reply to message #189380] Thu, 24 August 2006 07:19 Go to previous messageGo to next message
amul
Messages: 252
Registered: April 2001
Location: Chennai
Senior Member
Hello all,

I am having base table block "EMP" in the forms 10g involving emp table.

s.No empno ename
1 101 Ramanan
2 102 suresh
3 103 senthil
.. .. ..

The columns empno,ename are base table items in the emp block,S.No column
is NON BASE TABLE item in this block,my requirment is to generate this
S.No automatically during insert or query.


if anyone has solutions to this question,pls let me know.

Regards
Amul
Re: Generation of auto serial no's on a non base table item in forms 10g [message #190376 is a reply to message #189392] Wed, 30 August 2006 07:19 Go to previous messageGo to next message
GSREDDY
Messages: 13
Registered: October 2005
Location: Hyderabad
Junior Member
WHEN-CREATE-RECORD

Begin
:Emp.SerialNo := Get_Block_Property(:System.Cursor_Block, CURRENT_RECORD);
End;


hope this will help u

[Updated on: Wed, 30 August 2006 07:21]

Report message to a moderator

Re: How to generate the auto serial no in forms for database items? [message #191573 is a reply to message #188871] Thu, 07 September 2006 02:56 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
STOP posting the same question again and again. Either update your current post or add a new entry to it but DON'T create new ones!!

David
Previous Topic: Linux Space
Next Topic: which tables are affected?
Goto Forum:
  


Current Time: Fri Sep 20 11:34:14 CDT 2024