Link to home
Start Free TrialLog in
Avatar of hinamansoor
hinamansoor

asked on

Record count on Database Block

Record count on Database Block

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.

And also i have written Get_block_property on function also


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;
Avatar of Gerwin Jansen
Gerwin Jansen
Flag of Netherlands image

Hi, in what application are you developing?
"then it navigates to the database block canvas and displays records,"
Do you have that part working ?
Can you show that part of the code ?

I would expect an execute_query in it .
After that statement add
message('after the execute_query',acknowledge);  -- to verify if code stil executes after previous statement
and
add a call to the counting function you made
(or did you  that already?)
Avatar of hinamansoor
hinamansoor

ASKER

Thanks for reply i have already acomplished this task myself if you need i can post here

Regard
Hina mansoor
You can, or just delete the question.
ASKER CERTIFIED SOLUTION
Avatar of hinamansoor
hinamansoor

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I've requested that this question be closed as follows:

Accepted answer: 0 points for hinamansoor's comment #a39736545

for the following reason:

my question was I had two canvases (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 had to display record count message.  which i have done by using above code


Hina mansoor
Nice solution, thanks for sharing.
(The QUERY_HITS property I was not aware of)
plz close this question i have acomplished this task successfully



Thanks
Hina mansoor