Home » Developer & Programmer » Forms » Retrive Total Number in Details Block (Oracle 10g)
Retrive Total Number in Details Block [message #508438] Sat, 21 May 2011 03:33 Go to next message
swapnilpimple
Messages: 33
Registered: July 2010
Location: Mumbai
Member
HI all

I am working on form which consist of two block, now i need to know total record in detail block, but in form structure i have multiple details entry aginst 1 master entry and after going for next master entry the details of privious master entry are going for posting that's why i am unable to use the currnt_record function. do have any idea or function to retrive the total number of records in details tab.


Regards

Swapnil
Re: Retrive Total Number in Details Block [message #508440 is a reply to message #508438] Sat, 21 May 2011 03:48 Go to previous messageGo to next message
1982Hashmi
Messages: 69
Registered: March 2011
Location: Islamabad
Member
If your problem is to add a serial number is detail block records then you need a pre-insert trigger in detail block with following code.
SELECT NVL(MAX(sr_no),0)+1
INTO :DETAIL_BLOCK.SR_NO
FROM DETAIL_TABLE_NAME;
Re: Retrive Total Number in Details Block [message #508468 is a reply to message #508440] Sat, 21 May 2011 13:20 Go to previous message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
@Swapnil: is this question related to your previous one? I'd say so. But - what do YOU say?

@Hashmi: this is (most probably) wrong way to do what you described. Why? Because you'd always select the same value (unless you commit or post changes, which you didn't mention). Furthermore, in multi-user environment, it could happen that more than one user selects the same value. If this "serial number" is supposed to be unique (and it usually is), it would fail because you can't allow two users save the same serial number.
Previous Topic: retrieving values from mater table in child table
Next Topic: Forms 4.5 vs. 10g
Goto Forum:
  


Current Time: Sat Sep 07 15:37:16 CDT 2024