Record count on Database Block [message #603741] |
Thu, 19 December 2013 01:11 |
|
mist598
Messages: 1195 Registered: February 2013 Location: Hyderabad
|
Senior Member |
|
|
Hi all,
I have 2 canvas (1 canvas having database block items ,2nd having control block items & FIND button also in Control block), My requirement is when i select any one of the lov and click on the find button(in 2nd canvas , control block canvas)
then it navigates to the database block canvas and displays records, at that time i want to display record count message. for this i add on-count trigger on form level, but not working, Could any one suggest me please.
declare
cnt number := 1;
begin
go_block('HOPE_FORECAST_DATA');
first_record;
while :system.last_record = 'FALSE'
loop
cnt := cnt + 1;
next_record;
end loop;
message('There are ' || cnt || ' records in this block');
end;
And also i have written Get_block_property on function also
Thank You
|
|
|
|
|
|
|
Re: Record count on Database Block [message #603789 is a reply to message #603786] |
Thu, 19 December 2013 07:33 |
|
mist598
Messages: 1195 Registered: February 2013 Location: Hyderabad
|
Senior Member |
|
|
Hi Mughal,
1) i have 2 blocks(1 database, 1 is control block)
2) contol block having 5 items, created lov & 1 find button
3) 2 canvas for 2 blocks
4) i select any one of the lov(from the control canvas) , click on the find button, it shows database canvas
& displays table records
5) at that time i want to pop-up message at the database canvas(2nd canvas) , not pop-up at the control block canvas
I want to pop-up the message on the database canvas.Please suggest , i don't want put current_record ,total_record
Thank You
[EDITED by LF: fixed [img] tags]
-
Attachment: image1.png
(Size: 31.57KB, Downloaded 7632 times)
[Updated on: Thu, 19 December 2013 13:36] by Moderator Report message to a moderator
|
|
|
|
|
|
|
|
|
Re: Record count on Database Block [message #603933 is a reply to message #603925] |
Fri, 20 December 2013 08:21 |
|
mughals_king
Messages: 392 Registered: January 2012 Location: pakistan
|
Senior Member |
|
|
I really Did not exactly tested in App. server enviroment. BUT it should work
keep same function and put this code in
----WHEN-BUTTON-PRESSED----
DECLARE
counted NUMBER;
BEGIN
counted := count_Record('dept');
GO_BLOCK('dept');
EXECUTE_QUERY;
END;
see screen shot after clicking OK it will enter in next_block
Regard
Mughal
[Updated on: Fri, 20 December 2013 08:22] Report message to a moderator
|
|
|