Opening Form in Insert mode but making a query at the same time

My problem is that I want to open a Portal Form in Insert mode but at the same time making a query.
If I call a form with patameters the form opens automatically in update mode (to be more precise with FORMSTATE = UPDATE_AND INSERT). In that case the insert button is not shown.
I have come very close to a solution by running this code:
BEGIN
p_session.set_value(
p_block_name => 'DEFAULT',
p_attribute_name => '_FORM_STATE',
p_value => 'QUERY_AND_INSERT');
END;
under "... before processing the form". The form-state changes to QUERY_AND_INSERT' and I get the record from the table that I want but I still see no insert button!
I think that I can solve this problem in some table-triggers in the database but it would be interesting to know weather it is possible to do this in the portal.

Kari,
You can workaround the disappearing Insert button by creating a custom button instead.
If you look at the "standard" Insert button code it looks like this:
--- Type your PL/SQL code here...
doInsert;--- This is the default handler
--- ...and here, thanks...
in the generated forms package doInsert just calls internal insert handler:
procedure doINSERT
is
begin
onINSERT(
p_block_name => p_block_name ,
p_object_name => p_object_name,
p_instance => p_instance ,
p_event_type => p_event_type ,
p_user_args => p_user_args ,
p_session => p_session);
end doINSERT;
If you add a custom button to your form and from PLSQL event combobox select "Custom", then copy&paste this code to the event code:
onINSERT(
p_block_name => p_block_name ,
p_object_name => p_object_name,
p_instance => p_instance ,
p_event_type => p_event_type ,
p_user_args => p_user_args ,
p_session => p_session);
You will get a custom button which does exactly what the Insert button does and it will not disappear from the screen.
Thanks,
Dmitry

Similar Messages

  • (please urgent) two web modules , but only one run at the same time

    Hi sirs;
    In jDev 11g, I've a project with two viewControler fusion Adf and one model ( service bc4j ) ;
    When i Deploy the application using the topmost drop down list from jDev Ide ( application drop down list), only one of the two application works simultaneously.
    Look , the two applications works, but they do not work at the same time.
    stack trace like :
    zip:C:/Users/t/AppData/Roaming/JDeveloper/system11.1.1.1.33.54.07/DefaultDomain/servers/DefaultServer/tmp/_WL_user/PlanejamentoRH_V2.0/ebw81b/war/WEB-INF/lib/_wl_cls_gen.jar!/view/DataBindings.cpx
    25/09/2009 15:56:25 oracle.adfinternal.controller.faces.lifecycle.JSFLifecycleImpl setLifecycleContextBuilder
    INFO: ADFc: Inicializando Ciclo de Vida da Página do ADF para o ambiente JSF, LifecycleContextBuilder é 'oracle.adfinternal.controller.application.model.JSFDataBindingLifecycleContextBuilder'.
    25/09/2009 15:56:25 UNEXPECTED_CLIENT_OBJECT_TYPE oracle.adf.controller.internal.metadata.xml.MetadataResourceXmlImpl
    SEVERE: oracle.adf.controller.internal.metadata.xml.MetadataResourceXmlImpl
    25/09/2009 15:56:25 UNEXPECTED_CLIENT_OBJECT_TYPE oracle.adf.controller.internal.metadata.xml.MetadataResourceXmlImpl
    SEVERE: oracle.adf.controller.internal.metadata.xml.MetadataResourceXmlImpl
    25/09/2009 15:56:25 UNEXPECTED_CLIENT_OBJECT_TYPE oracle.adf.controller.internal.metadata.xml.MetadataResourceXmlImpl
    SEVERE: oracle.adf.controller.internal.metadata.xml.MetadataResourceXmlImpl
    <25/09/2009 08h56min13s AMT> <Error> <HTTP> <BEA-101020> <[ServletContext@7863650[app:PlanejamentoRH module:ORHQVagas path:/ORHQVagas spec-version:2.5 version:V2.0]] Servlet failed with Exception
    javax.el.PropertyNotFoundException: Target Unreachable, identifier 'controlerBean' resolved to null
         at com.sun.el.parser.AstValue.getTarget(AstValue.java:67)
         at com.sun.el.parser.AstValue.isReadOnly(AstValue.java:126)
         at com.sun.el.ValueExpressionImpl.isReadOnly(ValueExpressionImpl.java:230)
         at oracle.adfinternal.view.faces.renderkit.rich.EditableValueRenderer.getReadOnly(EditableValueRenderer.java:400)
         at oracle.adfinternal.view.faces.renderkit.rich.FormElementRenderer.renderAsElement(FormElementRenderer.java:211)
         Truncated. see log file for complete stacktrace
    >
    Is thrown , just when we try to browse the second application( the first one is ok , up and working );
    No metters , whose of the two applications is browse first , every the first work and the second fail;
    I've made other very simple application with two projects and the two worked well, at the same time, but the real project is giving me this problem;
    If someone could point me to some white-paper or give me some tips , I'll appreciate very much;
    Fowards Thanks;
    Marcos Ortega
    Brazil

    I reproduce it here;
    I Just relocate  the DataBindgs.cpx   to view/foo/DataBinds.cpx  and rename the view_view1PageDef to  view_foo_view_view1PageDef  and it's Works;
    Please muhammed, it is related with mds / ADF Security Configuration ?
    I was sure , that it will not work , in my thoughs "UNEXPECTED_CLIENT_OBJECT_TYPE" was throne because the second application should not be able to create a second instance of appModule because GUID problems ;
    As a metter of fact, it was raised again , but the page and all data was displayed;
    Lets see the log;
    Target URL -- http://127.0.0.1:7101/Application2-ViewController1-context-root/faces/view1.jspx
    09/10/2009 08:58:21 oracle.jbo.uicli.mom.CpxUtils$Visitor logMainApplicationCpx
    INFO: file:/C:/Users/t/AppData/Roaming/JDeveloper/system11.1.1.1.33.54.07/o.j2ee/drs/Application2/Application2-ViewController1-webapp/WEB-INF/classes/view/foo/DataBindings.cpx
    09/10/2009 08:58:22 oracle.adfinternal.controller.faces.lifecycle.JSFLifecycleImpl setLifecycleContextBuilder
    INFO: ADFc: Inicializando Ciclo de Vida da Página do ADF para o ambiente JSF, LifecycleContextBuilder é 'oracle.adfinternal.controller.application.model.JSFDataBindingLifecycleContextBuilder'.
    09/10/2009 08:58:25 oracle.adf.share.jndi.MDSBackingStore isReadOnlyMDSStore
    INFO: Read only backing store
    *09/10/2009 08:58:28 oracle.jbo.uicli.mom.JUApplicationDefImpl logCpxUsageIdCollision*
    SEVERE: Both view.foo.DataBindings.cpx and view.DataBindings.cpx use the same usageId: view_view1PageDef
    FIX: Use view_foo_view_view1PageDef as the usageId in view.foo.DataBindings.cpx
    09/10/2009 08:59:27 oracle.jbo.uicli.mom.CpxUtils$Visitor logMainApplicationCpx
    INFO: file:/C:/Users/t/AppData/Roaming/JDeveloper/system11.1.1.1.33.54.07/o.j2ee/drs/Application2/Application2-ViewController-webapp/WEB-INF/classes/view/DataBindings.cpx
    09/10/2009 08:59:28 oracle.adfinternal.controller.faces.lifecycle.JSFLifecycleImpl setLifecycleContextBuilder
    INFO: ADFc: Inicializando Ciclo de Vida da Página do ADF para o ambiente JSF, LifecycleContextBuilder é 'oracle.adfinternal.controller.application.model.JSFDataBindingLifecycleContextBuilder'.
    *09/10/2009 08:59:28 UNEXPECTED_CLIENT_OBJECT_TYPE oracle.adf.controller.internal.metadata.xml.MetadataResourceXmlImpl*
    SEVERE: oracle.adf.controller.internal.metadata.xml.MetadataResourceXmlImpl
    09/10/2009 08:59:30 oracle.adf.share.jndi.MDSBackingStore isReadOnlyMDSStore
    INFO: Read only backing store

  • Why can't insert more than two oam file at the same time in DW ?

    When I insert two oam at the same time, the page can't show any one!

    I found the problem, because I imported the width of two adaptive oam, then they can't show, here is the code, how do you look at me in the case of not cancel width adaptive to continue running
    =======================================================
    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>Home</title>
    <!--Adobe Edge Runtime-->
    <meta http-equiv="X-UA-Compatible" content="IE=Edge">
    <script>
      var custHtmlRoot="Untitled-1/Assets/";
      var script = document.createElement('script');
      script.type= "text/javascript";
    script.src = custHtmlRoot+"edge_includes/edge.5.0.1.min.js";
      var head = document.getElementsByTagName('head')[0], done=false;
      script.onload = script.onreadystatechange = function(){
      if (!done && (!this.readyState || this.readyState == 'loaded' || this.readyState == 'complete')) {
      done=true;
      var opts ={
        scaleToFit: "width",
        centerStage: "none",
        minW: "0",
        maxW: "undefined",
        width: "550px",
        height: "400px"
      opts.htmlRoot =custHtmlRoot;
      AdobeEdge.loadComposition('Untitled-1', 'EDGE-1177204', opts,
      {"dom":{}}, {"dom":{}});
      script.onload = script.onreadystatechange = null;
      head.removeChild(script);
      head.appendChild(script);
      </script>
    <style>
            .edgeLoad-EDGE-1177204 { visibility:hidden; }
        </style>
    <!--Adobe Edge Runtime End-->
    <!--Adobe Edge Runtime-->
    <meta http-equiv="X-UA-Compatible" content="IE=Edge">
    <script>
      var custHtmlRoot="Untitled-2/Assets/";
      var script = document.createElement('script');
      script.type= "text/javascript";
    script.src = custHtmlRoot+"edge_includes/edge.5.0.1.min.js";
      var head = document.getElementsByTagName('head')[0], done=false;
      script.onload = script.onreadystatechange = function(){
      if (!done && (!this.readyState || this.readyState == 'loaded' || this.readyState == 'complete')) {
      done=true;
      var opts ={
        scaleToFit: "width",
        centerStage: "none",
        minW: "0",
        maxW: "undefined",
        width: "550px",
        height: "400px"
      opts.htmlRoot =custHtmlRoot;
      AdobeEdge.loadComposition('Untitled-2', 'EDGE-1215759', opts,
      {"dom":{}}, {"dom":{}});
      script.onload = script.onreadystatechange = null;
      head.removeChild(script);
      head.appendChild(script);
      </script>
    <style>
            .edgeLoad-EDGE-1215759 { visibility:hidden; }
        </style>
    <!--Adobe Edge Runtime End-->
    </head>
    <body>
    <div id="Stage" class="EDGE-1177204"></div>
    <div id="Stage2" class="EDGE-1215759"></div>
    </body>
    </html>
    =======================================================

  • Can't open two streams from twitch fullscreen on different monitors at the same time, why not?

    When i try to open two streams each on one monitor ( in fullscreen), the one opened second just overlaps the existing one.

    Hi wilson1470,
    Only one window can be in fullscreen at a time. Is it possible to keep the second on in a tab of the same fullscreen window?
    This may be a nice alternative to what you are looking for: [https://addons.mozilla.org/en-US/firefox/addon/monitor-master/]

  • Sending a form to 2 different partner e-mail ids at the same time

    Hi,
    A case where a shipment has two deliveries with two different partners(e-mail partner function YM)and a form(eg. picking list) should be sent to both the partner e-mail ids. Is there any option to pass two e-mail ids to the structure SWOTOBJID that is passed to the open_form function module?
    Regards,
    Asha

    See the response to your other post

  • HP ProDesk 400 G1 Small Form Factor Business PC using vga and dvi at the same time.

    Looking into purchase a HP ProDesk 400 G1 Small Form Factor Business PC which has a VGA and DVI-D ports on the integrated video card.  Can you use both ports simultaniously. one screen connected to vga and a 2nd monitor connected to the DVI port?

    Hi,
    You might get better assistance on the HP Enterprise Business Forum.
    HP DV9700, t9300, Nvidia 8600, 4GB, Crucial C300 128GB SSD
    HP Photosmart Premium C309G, HP Photosmart 6520
    HP Touchpad, HP Chromebook 11
    Custom i7-4770k,Z-87, 8GB, Vertex 3 SSD, Samsung EVO SSD, Corsair HX650,GTX 760
    Custom i7-4790k,Z-97, 16GB, Vertex 3 SSD, Plextor M.2 SSD, Samsung EVO SSD, Corsair HX650, GTX 660TI
    Windows 7/8 UEFI/Legacy mode, MBR/GPT

  • Can I transfer data from one iphone to another (but later rather than at the same time)

    I currently have an Iphone 4 that was provided through my company but I am changing employment next month (as well as country) and was hoping to store all my current iphone software and data (hopefully on my computer) and then purchase a new Iphone 4 in which to update with said data.
    If anyone can offer insight in how to accomplish this I would be grateful!

    if the iphone have not been synced with another computer then just sync it with yours
    if it have then you cant syncing it with your computer would then clear the iphone and adding the info from your itunes to it

  • Open one than more file from Lightroom to photoshop at the same time

    Hi,
    i'm a PS Elements-User and i have a question. Is it possible to open more than 1 file from lightroom into photoshop with one click? Thank you in advance for helping me.
    SH

    I use PSE9 and send several derivate files (TIFFs) from LR to PSE9 all the time to do panos.
    I've recorded a little screen capture showing 4 images being sent to PSE9 from LR3.6. You can see the 4 tiffs being added to the catalog before calling PSE9 and then the 4 TIFFs arrive in PSE9.
    What Operating System do you use? Can you show a screenshot of the external editor settings for PSE?
    Beat

  • How top open multiple forms at the same time in HRMS menu

    Hi,
    When enabling "Close Other forms" in HRMS menu by excluding the function ‘Navigator: Disable Multiform’ Function in the Responsibility Definition (System Administrator -> Security -> Responsibility -> Define), mutliple forms works fine but I'am facing another error.
    My problem is: when this option is enabled, I tried to run Payroll run request but it turned out that payroll list of values is returning empty values and I'am unable to select any payroll from list of values. the only way to do so is to remove back ‘Navigator: Disable Multiform’ Function from exclusion section in responsibility.
    My requirment is: to have multiple form and payroll run list of values working at the same time
    Thanks

    Reason for this , if ur request is attached to more than 1 responsibility , i think this issue will come , we got same issue
    we remove it from responsibility list , then it is working fine

  • Wen i close firefox using win 7, and restart it, i get a box that says it is already running and to close it before using--but it wort close and the same thing keeps happening. what is wrong--previous versions on vista did,nt do this?

    if i open firefox and use it, when i get to last window and close it, if i try to reopen it, it says already open and to close pages but it will not close--the same box keeps coming back
    == This happened ==
    Every time Firefox opened
    == first time i loaded it onto new computer with win 7 64 bit

    Firefox v 3.6.3 running Win 7 Home premium. About every 6th or 7th time I go to open Firefox from my desktop I receive the same msg as the original poster receives. I must restart to clear up the problem. When I select restart it states a forced shutdown is required and asks if I want to proceed. I click yes, the computer restarts and problem is fixed until the next occurrence.
    My thanks for any assistance that may be available.
    If you require a screenshot let me know, please include instructions on how to do this though.

  • Inserting an image on multiple slides in Keynote at the same time?

    Is there a way to insert a logo on multiple slides at the same time in Keynote?  I have a standard presentation but put the logo of the company I am working with on each slide (in the same spot) one at a time.  It takes a while with 130 slides.  Any thoughts?

    Use  two presentations  to create the presentation:
    presentation 1 containing slides 1-30, 32-45, 56-70 using the slide master containing the logo
    presentation 2 containing the remaining slides using the slide master without the logo
    once designing is complete, drag and drop slides from presentation 2 into the navigator panel of presentation 1
    Navigator panel is the side panel on the left

  • Multiple objects to have the same rollover state at the same time (but link to different pages)

    Hi,
    I have a mac
    I would like to know how i can have multiple images with the same rollover states - but which show up at the same time on more than one image, (but each item to have its own linking property applied to it)?
    see image below: i want both box 'A' to pop with the same rollover state even if I'm hovering on just one of the boxes. But i want each of the boxes to link to different pages in my website.
    Ive tried grouping the images and moving them to their own layer, but the rollovers aren't 'linking' together on multiple objects
    help!
    thanks

    It's not, but you don't need that to achieve the behavior you've described. A1, a trigger, will have the states and hyperlink you desire. On rollover it will show its rollover state and will show its target container which will be directly on top of A2. It will look like a rollover state for A2. Repeat this for A2, B1 and B2 and I believe you achieve the behavior you've described. It's just a different way of approaching the problem (that happens to fit the tools available in Muse).

  • How to open a MD form in insert mode when calling from URL ?

    I have a MD form and I want to open it in 'insert' mode when I click on the URL.
    How can I do that ?
    thanks,
    Mainak

    I think somebody has asked the same questions earlier but I cannot find the link to that message. Please can anyone help me ?
    How to open a form in Insert mode from url link ?
    Mainak

  • Link Parameters from Report to Form in Insert Mode

    It seems like it should be possible to use the Report wizard to add a link to a form, select some link parameters using the Edit Link function, and then when one clicks on the link it would open the form in insert mode with the link parameters filled in as defaults. Instead what happens is it tries to open the form in update mode with a row that matches the link parameters, and if it can't find a match it opens in insert mode with no parameters filled in. I want it to always open in insert mode and with the passed parameters filled in.
    I've looked through all the documentation I have access to and have been through all the Portal FAQ's on OTN and can find nothing on this. There were a few questions in the FAQ's that told how to do it in PL/SQL, but I don't know how to get access to which instance of the link was selected by the user through PL/SQL, and it seems like there should be a way to do this from within the report wizard.
    Any help you can give me would be greatly appreciated.
    Best Regards,
    Jim Bladen

    If your report is created using ‘Reports From SQL Query’ then you can modify it using the following to achieve this:
    1. Remove the link from ‘Column Formatting’ section of the report object.
    2. In the SQL of the report , use custom link to the column where you want to provide link using the syntax
    select a.empno,’‘||a.ename||’‘ ename_link,a.deptno
    from scott.emp a
    Order by a.empno
    and the form will always open in ‘INSERT’ mode with passed values filled in.
    Thanks
    Krishnamurthy

  • ZForm only opens is 'read only" mode - but WDR_TEST_ADOBE, runs fine

    Dear readers,
    I am working on an Adobe form, now ZForm only opens is 'read only" mode - but when i run WDR_TEST_ADOBE, it runs fine and it is interactive and I am able to click on the buttons.
    I compared the form from WDR_TEST_ADOBE, and changed the layout to ZC1, and run the Web dynpro script. After activating and running the webdynpro, I see that it is still acting strange and none of the input fields are accepting input.
    There seems to be nothing wrong with the ADS or live cycle designer.
    Some setting in my Webdynpro is preventing this form from being displayed correctly.
    When I attach the form - "WDR_TEST_ADOBE_SIMPLE" from the WD - WDR_TEST_ADOBE, and test my WD, The form is being displayed as read only.
    which again leaves to the conclusion that the something is not right in the WD.
    ~Any suggestions are appreciated, thanks

    Also in the interface properties under sfp,
    when I change the interface type from
    "ABAP dictionary based interface" to
    "XML schema based interface".
    All the entries under Form interface->Import parameters get wiped out, and I have to enter them again.
    Also below is the system information.
    Software   ComponRelease   Level  Highest SupportShort Description of Software Co
    SAP_ABAP           700        0017     SAPKA70017     Cross-Application Component
    SAP_BASIS          700       0017     SAPKB70017     SAP Basis Component
    SAP_HR            600        0040     SAPKE60040     Human Resources
    and I am doing development on HR box, could this be causing trouble, bcos as per below link
    http://help.sap.com/saphelp_nw70/helpdata/en/77/3545415ea6f523e10000000a155106/frameset.htm from here goto: WebDynpro ABAP Development in Detail->Integration->Integrating Forms->Forms with ABAP Dictionary Based Interface. 
    As of NetWeaver 7.0 SPS10 we strongly recommend you use ZCI forms with an XML interface only. Because additional central features have been added in subsequent SPs (input help and dropdown list boxes), we generally recommend that you always use the most up-to-date Support Package for Web Dynpro ABAP.
    Edited by: Neha Sharma on Feb 1, 2010 11:21 AM
    Edited by: Neha Sharma on Feb 1, 2010 11:25 AM
    Edited by: Neha Sharma on Feb 1, 2010 11:27 AM

Maybe you are looking for

  • How do I upgrade my iPod for apps

    How do I upgrade my iPod for apps?

  • I want to put a specific folder in iCloud

    I already use Dropbox for a lot of business stuff. Now, I want to use Apple's iCloud for my personal stuff. I want to put a folder on my doc on my laptop and on my desktop that will be the same "synced" files consisting of inDesign files and PDF's. H

  • Issue at Portal when attaching document.

    Hi all, We have a Portal configured with SSO to SRM 6.0. The SSO works with SRM, but when we try to attach documents with SRM shopping card, a password prompt happens. The SSO was configured fine. Still the password prompt is happening. Any suggestio

  • Starting with javacard development

    Hello, I have to start the development of JavaCard applet and I need some information concerning which smart card to buy. As reader I have found the Omnikey CardMan 5321 and the 3121 except for the dual interface of the first one, are them comparable

  • Beginners Assistance with StarOffice and ODBC connections

    Hello, I apologize before hand for this VERY newbie question. One of the last hurdles to overcome in our company to deploying StarOffice, is the use of MANY refreshable Excel files that pull data from SQL servers. How do I get StarOffice to use these