Home » Developer & Programmer » Forms » Applying Serial No in detail block (Forms 6i)
Applying Serial No in detail block [message #521969] Mon, 05 September 2011 05:05 Go to next message
itech
Messages: 173
Registered: May 2008
Location: Fsd, Pakistan
Senior Member

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 #521971 is a reply to message #521969] Mon, 05 September 2011 05:10 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Where/how did you try to use :SYSTEM.CURSOR_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 messageGo to next message
itech
Messages: 173
Registered: May 2008
Location: Fsd, Pakistan
Senior Member

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 #521979 is a reply to message #521975] Mon, 05 September 2011 05:18 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
How 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;
Re: Applying Serial No in detail block [message #521991 is a reply to message #521979] Mon, 05 September 2011 06:02 Go to previous messageGo to next message
itech
Messages: 173
Registered: May 2008
Location: Fsd, Pakistan
Senior Member

Littlefoot wrote on Mon, 05 September 2011 15:18
How 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
Littlefoot
Messages: 21818
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.
Previous Topic: Need Form6i Triger
Next Topic: Mathematical symbols
Goto Forum:
  


Current Time: Sat Sep 07 12:57:38 CDT 2024