Re: Populate Multiple Rows in Form Builder

From: (wrong string) Παναγιώτης Λυγνός <plygn_at_yahoo.com>
Date: Wed, 23 Jun 1999 15:53:36 +0300
Message-ID: <7kqlat$j2l$1_at_newssrv.otenet.gr>


> Hi all,
>
> Thanks for taking your time to read my posting and hopefully u can help me
> to solve the problem.
>
> I have a Form that uses multiple rows (see attachment), I have another LOV
> button called Invoice. What i would like to do is when i click on the
> Invoice_LOV_button, it will automatically populate the rows in the Form.
>
> i have try to put my SELECT statements into the WHEN-BUTTON-PRESS trigger
of
> Invoice_LOV_button, however it's not working due to this multiple rows. i
> could done this for some other single line fields but having a big problem
> with multiple rows.
>
> I will be really appreaciate if u could help me solving this problem, i
need
> the solution asap.
> Thanks in advance!
>
> Regards
> Evelyn
>

Did you try to use a cursor instead of a select statement? Select causes errors when it is calls within PL/SQL.

Try to do this in WHEN_BUTTON_PRESSED.

Declare
  Cursor MY_CURSOR Is
    Your Select Statement here;
  cur_variable MY_CURSOR%RowType;

Begin
  Go_Block('Your_Block');
  Open MY_CURSOR;
  Fetch MY_CURSOR InTo cur_variable;
  While MY_CURSOR%Found Do

    :MY_BLOCK.ITEM1 := cur_variable.SELECT_COLUMN1
    :MY_BLOCK.ITEM2 := cur_variable.SELECT_COLUMN2
    :MY_BLOCK.ITEM3 := cur_variable.SELECT_COLUMN3
    ...
    Next_Record;
    Fetch MY_CURSOR InTo cur_variable;
  Loop;
  Close MY_CURSOR;
  Go_Block('Your_Block_With_Button');
End; Received on Wed Jun 23 1999 - 14:53:36 CEST

Original text of this message