Applying Serial No in detail block [message #521969] |
Mon, 05 September 2011 05:05 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
|
Hi, i have form with master detail relation ship (invoicing form)
the detail block is tabular, displaying upto 7 records...
now my clients wants to show the serial number along with each record while feeding the data (this includes when insert, editing, deleting / clearing records) he wants to see the serial number as in MS access / MS techniques.
i tried to use the system variable to use :system.cursor_record;
but this dose not works.(in insert/edit/delete/clear record)
|
|
|
|
Re: Applying Serial No in detail block [message #521975 is a reply to message #521971] |
Mon, 05 September 2011 05:14 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
|
i tried to use the formula item in detail block to display the system.cursor_record value, but thats not accurate, also, if you use the F6 to insert record in between the queried record it starts from 1 again in between the records...
|
|
|
|
Re: Applying Serial No in detail block [message #521991 is a reply to message #521979] |
Mon, 05 September 2011 06:02 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
|
Littlefoot wrote on Mon, 05 September 2011 15:18How about WHEN-NEW-RECORD-INSTANCE trigger (for new records) and POST-QUERY for existing ones? Both of them would look the same:
:block.serial_number := :system.trigger_record;
thanks it works ( i am using :system.trigger_record as a formulae to display its value along the detail block) but there is one issue so far i found that is
initially if u put 2 or more than 2 records then in post query go t the first recrd in detail block and press f6, the new record is created with seriano 2, thats ok, but hte origional serial no2 record is still showing 2 (and the further records number is wrong then.)
|
|
|
Re: Applying Serial No in detail block [message #521996 is a reply to message #521991] |
Mon, 05 September 2011 06:12 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](/forum/images/custom_avatars/72104.gif) |
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
Yes, because trigger didn't fire for these records. It means that you might need to recalculate serial numbers every time you insert the record, or find a way to disable inserting records anywhere except at the end of the list (i.e. one after another, no records in between). This might be done with the :SYSTEM.LAST_RECORD, I suppose.
|
|
|