Master-detail relationship - passing parameter from form to form

Hello.
I have a question about master detail relationship.
In first form we have master-detail relationship.
Example on dept, emp tables:
We query dept (master), so we can get one or many emp (detail) records. Then we have a third table - tasks. Tasks table (detail) can have many records for one employee.
Tasks table is in another form, which is called with call_form built_in. So we pass a parameter from master to detail - parameter empno. Because of that, we can only see tasks for one employee and can't navigate to another employee. This is normal.
Now comes the question.
Is it possible to call a form (with tasks table) with deptno parameter (so we can navigate through all employees with that department), but first show employee that was last used in first form?
Example of our goal.
Master: deptno = 20
Detail: navigate to JONES employee
Call new form (tasks)
Tasks for JONES employee are first shown
Can navigate to another employee - without requery
Is this possible?
If we pass deptno parameter, we can navigate through all employees - but must navigate to the employee we last used in first form.
If we pass empno parameter to second form, we see last used employee but cannot navigate to another employee without requery.
Hope you understand my problem.
Thanks.

Hi
yes you can pass parameter from one form to another.
In your master detail form set the trigger when-new-instance and there define the global variable like
:GLOBAL.G_CIRCLE_ID := NULL;
and in your task table set the trigger when-new-instance and there define the global variable like and also write this code
:GLOBAL.G_DIVISION_ID := NULL;
IF :GLOBAL.G_CIRCLE_ID IS NOT NULL THEN
     GO_BLOCK('DIVISION');
     SET_BLOCK_PROPERTY('DIVISION',DEFAULT_WHERE,'CIRCLE_ID ='||''''||:GLOBAL.G_CIRCLE_ID||'''');
     EXECUTE_QUERY;
END IF;
:GLOBAL.G_CIRCLE_ID := NULL;
now you maintain your trigger according your need.
Regards,

Similar Messages

  • Error While Passing Parameter from Form to Report

    I am using Dev 9ids. And i am compiling every forms from form 5 to form 9i. and report too.
    Most of reports are running.
    in some i am getting problem where i do pass more than 5,6 parameters.
    for e.g in one case say
    set_report_object_property(rep_id,REPORT_OTHER,'comp_code='||:global.vc_comp_code||' inv='||inv||' invoice_no='||inv_no||' invoice_date='||inv_dt||' vc_name='||cust_name||' Paramform=no');
    this will not run and give error FRM-41214
    when i exclude vc_name or shorten the value of cust_name report run fine.
    length of cust_name and in report vc_name is proper.
    I also need to pass more parameters to report.
    I do think there might be parameter size in any of report system files to be increased.
    Pls help me out how to rectify this problem.
    thanks in advance.
    raj

    You are not getting the result in the report because you have chosen the button event as Query.
    Edit the form, for the Execute button, choose the button event Custom and use the same pl/sql code that you have used before.
    If the event is Query, then the session object does not have value of A_EMPNO at the point where you have written your code. The session object is populated after the Query event has taken place.

  • How pass parameter from Form to Graphics through Report?

    I wrote a Report called by a Form and pass a parameter from the
    Form to the Report, successfully! But I imported a Graphic in
    the Report, and the Graphic could not get the parameter...(the
    parameter in the Report and Graphic should both pass from the
    Form).
    I call the Report by " Run_Product( REPORTS, :V_PRTNAME,
    SYNCHRONOUS, RUNTIME, FILESYSTEM, pl_id,NULL); " in the Form.
    and I imported the image from file for the Graphic in the Report.
    Thanks for your help!
    null

    Meilan (guest) wrote:
    : I wrote a Report called by a Form and pass a parameter from the
    : Form to the Report, successfully! But I imported a Graphic in
    : the Report, and the Graphic could not get the parameter...(the
    : parameter in the Report and Graphic should both pass from the
    : Form).
    : I call the Report by " Run_Product( REPORTS, :V_PRTNAME,
    : SYNCHRONOUS, RUNTIME, FILESYSTEM, pl_id,NULL); " in the Form.
    : and I imported the image from file for the Graphic in the
    Report.
    : Thanks for your help!
    Meilan,
    This forum is for Headstart related questions and experiences
    only. Please go to metalink.oracle.com to get more information on
    your problem.
    Regards,
    Ton
    null

  • UPDATE: Pass Parameter from Form to Form While on Seperate Pages

    I'm running 9iASR2 on Linux
    My issues is that In need to Take a Parameter entered on Form1 one a page then upon click of insert I need to pass a parameter entered into that form and naviagate to another page containing 2 portlets 1 being another form and 1 being a dynamic page both of the portlets on the second page need to beable to access the parameter.
    Since my last post I updated the PL/SQL code to better fit the situation and now have a different problem.
    Ok.. So I'm still attempting to do the same thing a about. Here what I tried and the outcome.
    1. I put following code in the succeful submission pl/sql procedure of the first form(the calling form).
    What a suspected the follow code to do was navigate to the page containing my other from in a portlet. Which it did. Cool!
    declare
    url varchar2(220);
    v_FLOWNAME varchar2(220);
    begin
    v_FLOWNAME := p_session.get_value_as_VARCHAR2(
    p_block_name => 'DEFAULT',
    p_attribute_name => 'A_FLOWNAME');
    url:='http://ebalpha3.us.oracle.com:7778/portal/page?_pageid=36,31629&_dad=flowmanager&_schema=PORTALSCHEMA&a.FLOWNAME='||v_FLOWNAME;
    call(url);
    end;
    2. It passed the follow URL http://ebalpha3.us.oracle.com:7778/portal/page?_pageid=36,31629&_dad=flowmanager&_schema=PORTALSCHEMA&a.FLOWNAME=MyFLow
    3. In the accepting form I input the following code in the before displaying the page section of the the form.
    declare
    FLOWNAME varchar2(200);
    begin
    FLOWNAME := portalschema.wwpro_api_parameters.get_value('FLOWNAME','a');
    p_session.set_value(
    p_block_name => 'DEFAULT',
    p_attribute_name => 'A_FLOWNAME',
    p_value => FLOWNAME);
    end;
    What I expected it to do is take the a.FLOWNAME from the url and input it into the FLOWNAME variable, but the FLOWNAME variable came across as blank and the FLOWNAME text area came accross as blank because the FLOWNAME parameter was never pulled.
    What do you think?
    Thanks for you help!

    I have a similar problem where I have a portlet X which accepts parameters using the <passAllUrlParams>true</passAllUrlParams> tag in the provider.xml and it works if portlet X is directly on page A. However, because I need to wrap portal security around this portlet declaratively, I will need to apply security on this page A and then publish page A as a page portlet Z, then drop page portlet Z on another page, page B. (I hope you all been through this before to apply security around a portlet). By doing this - the parameters are no longer being passed into portlet X anymore.
    To get around this - I will need to define page parameters for page A and map them to portlet X via the "Parameters" tab in edit mode and then define the same set of page parameters on page B and map them to the page portlet Z just to get the parameter passing working and flowing through to portlet X.
    Is there anyway around this?
    Do we always need to define page portlets in 10.1.4?
    What does the <passAllUrlParams>true</passAllUrlParams> tag do in 10.1.4?
    In 10.1.2 - the <passAllUrlParams>true</passAllUrlParams> tag was all you need to pass any number and type of parameters from a page B->page-portlet Z->portlet X
    This feature seems to be missing in 10.1.4.
    Please respond.
    Thanks
    Stanley

  • Pass Parameter from Form to Form While on Seperate Pages

    I'm running 9iASR2 on Linux
    I know there are allot of postings on Passing parameters and I'd hate to bring it up again, but I've been attempting this for a few days now and can't seem to figure it out.
    My issues is that In need to Take a Parameter entered on Form1 one a page then upon click of insert I need to pass a parameter entered into that form and naviagate to another page containing 2 portlets 1 being another form and 1 being a dynamic page both of the portlets on the second page need to beable to access the parameter.
    I am abable to pass the parameter between the forms when not running in a portlet with the code below.
    declare
    url varchar2(220);
    v_FLOWNAME varchar2(220);
    begin
    v_FLOWNAME := p_session.get_value_as_VARCHAR2(
    p_block_name => 'DEFAULT',
    p_attribute_name => 'A_FLOWNAME');
    url:='portalschema.wwa_app_module.link?' ||
    'p_arg_names=_moduleid&p_arg_values=1082756362' ||
    '&p_arg_names=_show_header&p_arg_values=NO' ||
    '&p_arg_names=FLOWNAME&p_arg_values=' || v_FLOWNAME;
    call(url);
    end;
    Thanks for You Assistance!

    FRM 41213 : unable to connect to the report server repsrv+
    Look at this ....
    Did u created the report server from the command prompt
    If yes
    Did u started the report server
    if not
    use this from the command prompt
    rwserver server = yourservername start

  • Passing parameter from forms 9i to reports

    Hi,
    I have a parameter form running on forms 9i. i am running my forms through a web browser. When i pass a character parameter containing blank spaces in between, my report does not run, but it works fine when i pass a parameter without any spaces...
    my application is thin client based..
    Any solution for this problem?
    Thnks

    Hi Frank,
    Thanks for replying, How do i do this? here is the piece of code
    run_report('DGAR004''p_signatory',:signatory,
              'p_gua_title', :title
    I will have to pass :signatory within quotes ? how do i do this?

  • Passing parameter from Form to URL

    Hi,
    I have a form with one field with LOV (combobox). When user chooses a value it should open the same page but with one parameter added. I tried out this:
    OnChange JavaScript:
    window.open('http://lesoprojekt.sk:7779/portal/page?_pageid=33,31392,33_31648&_dad=portal&_schema=PORTAL&dep='||depno)
    where depno is a form field and I need to pass its value.
    But the URL result is only http://lesoprojekt.sk:7779/portal/page?_pageid=33,31392,33_31648&_dad=portal&_schema=PORTAL&dep=
    I need it as a page parameter because it is being passed to OmniPortlet.
    Any help?
    thanks,
    Brano

    Yes, but your form which is getting invoked with this call needs to have this parameter (in object navigator).
    If the name of your parameter is e.g. OWNPNAME you will have to add an parameter object in the form named OWNPNAME.
    In addition, in the config section of your application in formsweb.cfg you will have to add :
    otherparams=OWNPNAME=%OWNPNAME%
    Then, you cann embed OWNPNAME within the url call
    ...&OWNPNAME=xyz

  • Hw to pass parameter from report to forms

    Dear Friends,
    I m working on Forms n Reports 6i,
    I m running report n passing parameter from the forms now the requirement is that if report run successfully it shuld give the msg otherwise give an user define error msg.
    Hw do i pass any parameter from report to form for acknowledgment.
    Thanking yours
    Chandan

    Hi Rajat,
    using run_product built in i can pass parameter from forms to reports but hw can i get some parameter value from reports to forms as mentioned earlier my post
    Thanking Yours,
    Chandan

  • Master-Detail relationship and querying back from the detail block

    Hello friends,
    Using oracle forms 6i. I have a multi data block. On the block there is a header and detail section. There is master detail relationship present in these blocks. I have a sequence defined, which generates an auto-number.
    Now in the detail section say I have 4 records all of which are say invoices and I am populating the details about it. On the 'save' button I have defined a logic which generates an auto- number or a unique number for all the 4 records in the detail section. The unique number is shown in the header section in a text-field.
    Now when I query (F11 and then Ctrl+F11) with the help of the unique number i see all the 4 records under it in the detail section. But when I query with the help of one of the 4 records in the detail section it says "fetching more than a single row." I know the same unique number is there for all the 4 records and in the header section I am displaying "number of items displayed" to be 1. That is why the error. But I want that to remain one. How exactly can I develop this functionality of querying the unique number in the header section from the detail block?
    Please help as soon as possible.

    Hi,
    I'd suggest to check this tutorial:
    http://www.oracle.com/technology/obe/obe_as_10g/bi/forms/formsmasterdetailobe.htm
    Having a relationship between data blocks, coordinates dml actions in both, so no coding is needed to save/update/delete records, forms built-ins do the work.
    hope this is useful,
    Hugo

  • Passing date parameter from forms to report

    Hi,
    I'm using forms and reports 6i.
    I want to pass one date parameter from forms to reports.
    Using
    Add_Parameter(pl_id,'P_FROM_DATE',TEXT_PARAMETER,:FROM_DT);
    giving me error REP-0091- Invalid value for parameter 'P_FROM_DATE'
    This i think is because report expects date and here it is converted as varchar.
    Please help

    Hi Divya,
    Even I use this kind of statement
    Add_Parameter(pl_id,'P_FROM_DATE',TEXT_PARAMETER,:FROM_DT);and works fine for me.
    This i think is because report expects date and here it is converted as varchar
    Correct.
    Open the report in the builder and under Data Model -> User Parameters, Go to the Property Inspector of P_FROM_DATE. Under Parameter, set Datatype as Character instead of Date.
    Hope this should work. and tell me if it works(coz it wokred for me).

  • How can I pass parameter from report to form?

    Hi :)
    Now I try to build conference room like this by using form
    and report. And i design that when users click at group report
    then i'll show page that contain questions report and add
    question form. And question form and report must receive the
    same parameter from group report.
    First Problem: is I don't know how group report send the
    same parameter to question report and add question report at the
    same time. And is it possible??? If not please suggest me what
    should I do???
    Second Problem: is I don't know how can I pass parameter from
    report to form. I don't know the way to do it.
    Please tell me!!! Please...
    I look forward to hearing from all of you.
    Thank You.

    One way is to create a link based on that form and attach that
    link with the report. Through links you can pass parameters

  • Passing Parameter from URL to Web Forms - Oracle 10 Application Server

    Hi All -
    I want to pass parameter from a URL to 10g Oracle Web Forms - Oracle Application Server 10.1.2
    http://server1/forms/frmservlet?config=SATWEB_SSO&otherparams=username_sso=BABUS
    How to receive this 'username_sso' value inside my forms application ?
    Created a Parameter in the same name as URL parameter 'username_sso' in forms but didn't receive the value. I want to know how to receive the value of this parameter within forms from URL.
    Thanks - Suresh

    Try this,
    1. Create a parameter in the formsweb.cfg (say username_sso) under default section ( or you can create it in your own config section)
    2. Add the username_sso in otherparams parameter as username_sso=%username_sso%
    3. Add this username_sso parameter in your form.
    4. Run the form as
    http://<machine>:<port>.....?form=blahblah....&otherparams=username_sso=scott
    Regards,
    Arun

  • Master Details relationship

    I have an application where I need to have master detail relationship. I have seen a demo ( dept-emp ) but my requirements are slightly different from this demo.
    Just to simplify it, I have these fields in the SD_SOWS which acts as MASTER table and it has SOW ID as primary key.
    And I have 2 detail tables. One is used to hold all the handsets (SD_SOW_HANDSETS ) and the other one is to hold all the platforms ( SD_SOW_PLATFORMS ) . And they both are tied up using SOW_ID column ( this is the fk ).
    The problem arises when I added a new SOW and I have assigned SOW ID with the new value automatically by changing SOURCE to SQL Query and run this statement below :
    SELECT NVL( NEXTVALUE ,1)
    FROM (SELECT MAX(SOW_ID) + 1 NEXTVALUE
    FROM SD_SOWS
    But
    1) when I added the one of detail tables ( SD_SOW_HANDSETS ) , this new SOW ID doesn't get carried forward to SOW ID column of this detail table (it becomes blank )
    2) If I entered this column manually ( assuming I use the same number as the one in MASTER table -SD_SOWS ) and I have it saved , it throws exception
    ORA-02291: integrity constraint (DSSMASTER.FK_SOW_HANDSET_SOWID) violated - parent key not found
    I know the reason is that I haven't confirmed and saved the master table yet but I was wondering if HTMLDB can create a dummy SOW ID in the MASTER table and save it temporarily in db where it allows the children / details to reference the same number.
    any ideas ?
    Dony

    I'm always getting the same details for all masters rows. any idea what could it be ? Sounds like you didn't set the Block.Query Data Source Arguments property so that your Master block key values are not getting passed to your "Query" procedure. You will need to create a parameter to your procedure for the key value as well. Did you use my Demo or My Oracle Supports? If you used my demo, you will need to modify the EMP_SELECT procedure to accept the DEPT_NO as a parameter and then adjust your query to use the parameter.
    If you used My Oracle Supports demo (doc ID 66887.1) then look at Example B. Multi-Block operations with Master-Detail relationship. It shows you how to write the query procedure to accept additional parameters.
    Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • Master-Detail Relationship problem

    I've spent 1.5 days already trying to solve this problem. I'm creating a JClient application using BC4J with a Master-Detail relationship. The relationship between tables is a many-to-many thru an intersection table. I've gotten my master and detail data to show with columnar form data in the top(master) panel and table data in the lower(detail) panel. My problem is that each time I get a master record that contains more than one detail record, each time I click the next navigation button in the master pane it will remain on the master record for the number of detail entries. For example, if a master record has 3 children, then I must click the next button 3 times to move to the next master record. I know that it has something to do with the way the entities are joined but I can't figure out how to join them any other way. Can anyone give me a hint how I can make the master panel only show one record for each Master-Detail relationship (even though the intersection table says its a many-to-many)?
    Thanks,
    Mark

    Apparently, I was making things much more complicated than they needed to be (rather, JDev was). My first attempt at MD relationships, I followed the examples in the help files. JDev created VO's, Entities, Assoc's, View Links, etc... Everything but the kitchen sink! After researching a bunch more, I found that the only thing I needed to do was to create my view objects to display exactly what I wanted to see in my panel regardless of whether it was a parent or a child. Once I had the view objects straight, then I could connect them using a view link and JDev handled the rest. Pretty slick but, I wish there was some better documentation. My next problem is that I'm trying to make this a Master-Detail-Detail-Detail window. The master needs to be a JComboBox, displays only a date, and needs to appear in the same panel as it's child. The 1st child will have a navbar that cycles through a bunch of orders based on the date from the combo box. The order panel's child is in the lower panel and displays the order detail items. It also has a navbar. The lower detail panel needs to have a split pane with the upper part showing the order detail and the lower part showing the materials used in making up that order detail item.
    So far, I've got the first 3 parts done (ie. combobox, orders, and details). For the combobox, I used a JComboBox navigationbinding. It shows the correct date, but my control is always disabled. I can't figure out why the combobox is always disabled. The enabled property is set to true. Anbody have any clues?
    Thanks,
    Mark

  • Displaying a Master Detail Relationship in a Panel Accordion or Tabs

    Hi,
    Is it possible to display a Master-Detail relationship in a Panel Accordion or Panel Tab or other component that visually divides the display?
    Say I have a Department - > Employees master detail relationship and I want each tab in my accordion to represent each
    departments and when I clicked the tab, the list of employees associated with that department is displayed.
    I am exploring this idea but I cant get to find a resource on how to move forward. I am using JDev 11.1.1.4. Thanks

    Hello,
    I recently faced the same problem and did not find a clean solution either. So I implemented it a bit more "dirty". :-)
    Instead of using the Department > Employee view link, I just created a new view object (say EmployeesFromDept), that has a bind parameter called p_DeptId:
         SELECT ...
         FROM   EMPLOYEES e
         WHERE  e.DEPARTMENT_ID = :p_DeptIdThe Data Control of this VO will have an ExecuteWithParams operation that takes the department id as input. Create an action binding in your page definition that binds to this operation, called "RefreshEmployeesForDept":
         <action IterBinding="EmployeesFromDeptIterator" id="RefreshEmployeesForDept"
                InstanceName="MyAMDataControl.EmployeesFromDept"
                DataControl="MyAMDataControl" RequiresUpdateModel="true"
                Action="executeWithParams">
          <NamedData NDName="p_DeptId" NDValue="" NDType="java.lang.String"/>
        </action>In your page, add the current DepartmentId to each showDetailItem using an attribute and add a disclosureListener:
         <af:iterator id="i1" value="#{bindings.Departments.collectionModel}" var="row">
                <af:showDetailItem text="#{row.DepartmentName}" disclosureListener="#{pageFlowScope.myBean.toggleDisclosed}">
                   <f:attribute name="currentDepartmentId" value="#{row.DepartmentId}"/>
                              <af:table value="#{bindings.EmployeesFromDept.collectionModel}" var="row"
                          rows="#{bindings.EmployeesFromDept.rangeSize}"
                          emptyText="#{bindings.EmployeesFromDept.viewable ? 'No data to display.' : 'Access Denied.'}"
                          fetchSize="#{bindings.EmployeesFromDept.rangeSize}"
                          rowBandingInterval="0" id="t1">
                   //Lots of mapping column here
                        </af:table>
                </af:showDetailItem>
         </af:iterator>Now each showDetailItem that is generated knows the DepartmentId it "belongs to". In the toggleDisclosed(DisclosureEvent disclosureEvent) method, first fetch this attribute, so that you know the dept id of the showDetailItem that was clicked. Next, programmatically call the RefreshEmployeesForDept action binding if the current event is "disclosing the showDetailItem":
         public void toggleDisclosed(DisclosureEvent disclosureEvent) {
              String currentDepartmentId = disclosureEvent.getComponent().getAttributes().get("currentDepartmentId").toString();
              if(disclosureEvent.isExpanded()){
                   DCBindingContainer bindings = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
                   OperationBinding operBinding = bindings.getOperationBinding("RefreshEmployeesForDept");
                   if(operBinding != null){
                        operBinding.getParamsMap().put("p_DeptId", currentDepartmentId);
                        operBinding.execute();
        }Now, each time a showDetailItem is opened, the bind variable of the iterator belonging to your list of Employees will be refreshed with the correct DepartmentId. Ie the department that the showDetailItem represents.
    Hope this helps! If you find a cleaner solution, please let me know. :-)
    Regards,
    Chris

Maybe you are looking for

  • Solutions for connecting dual screens to MacBook Pro?

    Anyone have any solutions for connecting TWO (2) individual displays to a MacBook Pro?  I am currently using "Matrox Power Desk" but this thing *****!  I have two Apple 23" Displays (they're older, probably from 2006ish) and want a better method for

  • How to check the selected items of a selectManyListbox in doDML of an EO ?

    Hello, I have a VO based on en EO. During the doDML(UPDATE) of that EO, I would like to check what items of a af:selectManyListbox have been selected. How could I get the checked items in the selectManyListbox (which belongs to the ViewController) in

  • Rendering Problems using PDK-URL (URL dynamically changes)

    Oracle 9i Application Server 1.0.2.2.1 Oracle Portal 3.0.9.8.0 PDK Services for Java version 3.0.9.0.5. PDK URL Services version 3.0.9.0.4. Oracle HTTP Server 1.3.19.0.0a The PDK-URL installed fine and the rendering examples work (www.google.com, etc

  • Business Process of different Industries

    Well,I know the answer of this question will require huge articles but I just need a general introduction. As we know SAP is deployed in number of different industries can anyone name them and explain the major differences between them considering th

  • Color problems in CS3

    I've searched all the forums but haven't found a solution yet.  My color swatches have lost the RGB colors in photoshop CS3. I've checked all the normal solutions, like color settings,  tried the fly out menu settings, etc and found all to be set cor