Re: How can a record be passed to a form?

From: <wasim_ahmed_at_my-deja.com>
Date: Thu, 07 Oct 1999 10:35:20 GMT
Message-ID: <7tht18$erh$1_at_nnrp1.deja.com>


You have two choices, either use form level parametes or use global variables to pass the required text.
If you'll use form level parameters then you need to put values in the parameters before calling the form. As an example

Declare
PList ParamList;
Begin

   PList := Get_Parameter_List('PARAM');    If ID_NULL(PList) then

      PList := Create_Parameter_List('PARAM'); -- The SCHEDULE_PARAM parameter must defined in the form to be opened.

      ADD_PARAMETER(PList,'SCHEDULE_PARAM',TEXT_PARAMETER , var_name);    Else
     ADD_PARAMETER(PList,'SCHEDULE_DATE_PARAM',TEXT_PARAMETER,var_name);    End If;
   OPEN_FORM('MODIFY_SCHEDULE' ,ACTIVATE, SESSION,

                  NO_SHARE_LIBRARY_DATA, PList);
End;

To pass query use the same method and set the DEFAULT_WHERE property of your block in second form using built in procedure Set_Block_Property. But in this way you can only restrict the result using where clause and cannot change the selected columns.
Hope this helps
Wasim.

In article <0UYK3.13704$w8.266635_at_wbnws01.ne.mediaone.net>,   "Scott Powers" <scottp_at_netzero.com> wrote:
> Hi there,
>
> I am working with 2 forms. The first form has a textbox which
contains the
> user's name (inputted by the user).
> Using that value, I want to invoke my second form that is to display
all the
> fields of the record identified
> by this username. I am trying to use Open_FORM('frm_employeedetail',
> :login.txt_inputemployeename). But
> it doesn't work. How can I pass the :login.txt_inputemployeename to
the
> form: 'frm_employeedetail' so that
> it displays the details for this particular username?
>
> Instead of passing :login_txt_inputemployeename, could I pass it a
query:
> 'select ...' instead, so that the second form
> displays only the records that match the query criteria as passed to
it by
> the first form?
>
> Thanks much!
> Scott
>
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Thu Oct 07 1999 - 12:35:20 CEST

Original text of this message