PassBack values from custom page to "Popup Key LOV"

I'm trying to use a popup page to passback a return value and display value to a "Popup Key LOV (Displays description, returns key value)" Item type (using javascript).
So I have Page 1 with "Popup Key LOV" Item "P1_CONTACT_ID".
From a popped up page I'm try to use the following javascript function to pass the values back so P1_CONTACT_ID displays the display value and also stores the "key value" hidden away:
function passBackToBooking(passitem1,passitem2,passVal1,passVal2)
opener.document.getElementById(passitem1).value = passVal1;
opener.document.getElementById(passitem2).value = passVal2;
opener.document.getElementById(passitem1).focus();
close();
I'm calling the function as follows from a column link on a report on the popped up page:
javascript:passBackToBooking('P1_CONTACT_ID','P1_CONTACT_ID_HIDDENVALUE','#FULL_NAME#','#ID#');
However the function seems to do nothing (does not even close the window).
I can get the intended result by copying and using the javascript from the "real" popup window (using the standard popped up window) (see following javascript) - but this is hard coded and inflexible. Everytime I change the order of items on P1 the function has to be amended to suit the apex created item names (e.g. p_t13, p_t12) (uses "name" rather than "id")
function passBack(x,y){
if (opener.document.forms["wwv_flow"].p_t13.length > 1){
var l_field = opener.document.forms["wwv_flow"].p_t13[8];
l_field.value = x;
opener.document.forms["wwv_flow"].p_t12[8].value = y;
}else{
var l_field = opener.document.forms["wwv_flow"].p_t13;
l_field.value = x;
opener.document.forms["wwv_flow"].p_t12.value = y;
if(l_field.getAttribute('onchange') || l_field.onchange){l_field.onchange()}
window.close();
if(!(l_field.disabled || l_field.type == 'HIDDEN')){l_field.focus();}
Apologies if this is longwinded, I've spent alot of time on this and can't resolve.
Any suggestions much appreciated.
Thanks
jacr

Yes Sumit, It is a formvalue(created using personalization). Since in the existing page these values are not available as formValues, I created 2 formvalues using personalization and set the VO attributes accordingly.
Thanks!

Similar Messages

  • How to create a page like Popup Key LOV page

    I want to create a page like the page when clicking an Popup Key LOV item. Is there a template which i can see how it has been created.
    Thanks,
    Jen

    I have a similar problem. I created a custom popup window and I'd like to apply a theme in order the custom popup has the same appearence as an standard popup window. The problem is that the new popup has a report region inside of it, and it only lets me apply Report templates (the popup template doesn't appear).
    Is there any way to fix this?

  • Error while selecting NULL value from Popup Key LOV(numeric or value error)

    Hi,
    I have a item P1_DEPTNO with following properties.
    P1_DEPTNO - Popup Key LOV (Displays description, returns key value)
    LOV - P1_DEPT_LOV
    select deptname d, deptno r from deptP1_DEPTNO item properties
    List of Values
      Named LOV - P1_DEPT_LOV
      Display Null - Yes // changed to Yes, so that it can accept NULL values.
      Null display value - NULL
      Null return value -   (blank)PL\SQL Process -
    declare
    v1 number;
    begin
    if :P1_DEPTNO is null OR :P1_DEPTNO = '' then
        v1 := 0;
    else
        v1 := :P1_DEPTNO;
    end if;
    // rest of the PL\SQL process
    end;Now, when I run the page and select NULL value from Popup LOV and submit, I get the following error.
    ORA-06502: PL/SQL: numeric or value error: character to number conversion error.When, I select any other value other than NULL, then it's working perfectly fine.
    Only in case of NULL value, I am getting this error.
    ANY idea, why this error is coming??
    Thanks,
    Deepak

    Hi Varad,
    I did the following change
    Null display value - (blank) // by default it is displaying '%' in the select this
    Null return value - -1
    but when I select % (null value) from the popup list, it displays the return value -1 in the text field.
    My question is why it is displaying the return value -1 in the text field...*It should display the display value in the text field (i.e blank in this case)*
    then, I did the following change
    Null display value - (blank) // by default it is displaying '%' in the select this
    Null return value - // a single space, so that when I select %(null value) from the list, it should display blank in the text field...
    then I did the following change in the PL\SQL process.
    PL\SQL process
    declare
    v1 number;
    begin
    if :P1_DEPTNO = ' ' then // -- checking the value of single space ' ' when we select %(null) in the popup list, BUT even I select %(null), control is not coming here.
        v1 := 0;
    else
        v1 := :P1_DEPTNO;
    end if;
    // rest of the PL\SQL process
    end;Thanks,
    Deepak

  • How to call & pass values to custom page from seeded page table region

    Hi All,
    can anyone tell me how to call & pass values to custom page from seeded page table region(Attribute is not available in seeded page VO)
    it is urgent. plssss
    Regards,
    purna

    Hi,
    Yes, we do this by extending controller, but you can also try this without extending controller.
    1. Create Submit Button on TableRN using personalization.
    2. Set "Destination URI" property to like below
    OA.jsp?page=/<yourname>/oracle/apps/ak/employee/webui/EmpDetailsPG&employeeNumber={@EmployeeId}&employeeName={@EmployeeName}&retainAM=Y&addBreadCrumb=Y
    Give your custom page path instead of EmpDetailsPG.
    EmployeeId and EmployeeName are VO attributes(Table Region)
    If you dont have desired attribute in VO, then write logic in your custom page controller to get required value using parameters passed from URL path.
    In this case, only personalization will do our job. Hope it helps.
    Thanks,
    Venkat Y.

  • Popup Key LOV, NULL and "Invalid numeric value undefined for column"

    Hello.
    I've created an item based on database column of NUMBER type and set the following properties:
    Display As = Popup Key LOV (Displays description, returns key value)
    List of values definition=select 'display_value' d, 1 r from dual
    Null display value=%
    Null return value=
    Display Null=Yes
    When I select "%" in the LOV and try to apply changes to database I get error:
    ORA-20001: Error in DML: p_rowid=1781, p_alt_rowid=N1, p_rowid2=, p_alt_rowid2=. ORA-20001: Invalid numeric value undefined for column N2
    Error Unable to process row of table TTT.
    If I set Display As = Select List, all works fine. But I need Popup Key LOV.
    Could anybody help me?
    I use Application Express 2.2.1.00.04

    Hi all,
    I did my homework and solved this issue. First I would like to thank Patrick Wolf for the invaluable help he gives out on thread Re: Null value handling in LOVs The code presented here is just a minor edit to his code, but an essential one when dealing with Popup Key LOV items.
    Here's what I did:
    1. Create an Application Process.
    Name: RemoveNulls
    Sequence: 0
    Point: On Submit: After Page Submission - Before Computations and Validations
    Process Text:
    BEGIN
        FOR rItem IN
          ( SELECT ITEM_NAME
              FROM APEX_APPLICATION_PAGE_ITEMS
             WHERE APPLICATION_ID   = TO_NUMBER(:APP_ID)
               AND PAGE_ID          IN (TO_NUMBER(:APP_PAGE_ID), 0)
               AND LOV_DISPLAY_NULL = 'Yes'
               AND LOV_DEFINITION   IS NOT NULL
               AND LOV_NULL_VALUE   IS NULL
        LOOP
            IF (V(rItem.ITEM_NAME) = '%null' || '%' OR V(rItem.ITEM_NAME) = 'undefined')
            THEN
                Apex_Util.set_session_state(rItem.ITEM_NAME, NULL);
            END IF;
        END LOOP;
    END;Error Message: #SQLERRM#Condition: None
    2. You should be able to submit a Popup Key LOV with a NULL value now.
    Once again, THANKS, Patrick! You rock! I'm seriously thinking of trying ApexLib now :)
    Georger

  • Passing data from calling page to popup window

    Hi All,
    We are developing a BSP application for business card.I need to provide a preview button .
    when the user clicks this button a
    poopup window should open with the preview of business card.
    My problem is how to pass the values like name , designation etc from the main page to popup window.
    The code for previre image:
    <h t m l b : i m a g e   s r c = " s _ b _ d e  tl . g i f  " a l t = " P r e v i e w   C a r d "  o n C l i c k="addr" on C l i e n t C l i c k = " c a l l W i n d o w ( ) ; "/>
    <s c r i p  t t y p e = " t e x t / j a v a s c r i p t ">
    f u n c t i o n  c a l l W i n d o w ()
    w i n d o w .o p e n ( " p r e v i e w . h t m " ) ;
    </s c r i p t >
    preview.htm is a simple HTML page . i need to pass values from main page to this page.
    OR
    Is it possibel to restrict the size of a VIEW to use it as a popup window?
    OR
    is there any other way to achieve this like.. the <bsp:call comp_id=" " />
    tag , but i have no idea how to use it.
    Thanks,
    Anubhav.
    Edited by: Anubhav Jain on Sep 12, 2008 3:38 PM

    Hi Raja,
    I did as suggested by you...but it is behaving strangely.
    It works fine in debuging mode but when executed directly ....it is not working.
    the scenario is:
    Thers an image for preview as follows:
    <htmlb:gridLayoutCell columnIndex="3" rowIndex="13">
    <htmlb:i m a g e   s r c = " s _ b _ d e t l . g i f "   a l t = " P r e v i e w   C a r d "   o n C l i c k = " a d d r "   o n C l i e n t C l i c k = " c a l l W i n d o w ( ) ; " /  >
    </htmlb:gridLayoutCell>
    The JS code is:
    f u n c t i o n   c a l l W i n d o w ( )
    <%
    data: title(5),
             fname(20),
             lname(20),
             comp(20),
             addr(20),
             city(20),
             state(20),
             pcode(20),
             country(20),
             phone(20),
             fax(20),
             email(241).
             alt_addr-title = request->get_form_field( 'title' ) .
             alt_addr-firstname = request->get_form_field( 'fname' ) .
             alt_addr-lastname = request->get_form_field( 'lname' ) .
             company = request->get_form_field( 'comp' ) .
             alt_addr-street = request->get_form_field( 'addr' ) .
             alt_addr-city = request->get_form_field( 'city' ) .
             alt_addr-region = request->get_form_field( 'state' ) .
             alt_addr-inhouse_ml = request->get_form_field( 'pcode' ) .
             alt_addr-country = request->get_form_field( 'country' ) .
             alt_addr-tel1_numbr = request->get_form_field( 'phone' ) .
             alt_addr-fax_number = request->get_form_field( 'fax' ) .
             alt_addr-e_mail = request->get_form_field( 'email' ) .
    CALL METHOD cl_bsp_server_side_cookie=>set_server_cookie
              EXPORTING
                name                  = 'FORMFIELDS'
                application_name      = runtime->application_name
                application_namespace = runtime->application_namespace
                username              = sy-uname
                session_id            = runtime->session_id
                data_value            = alt_addr
                data_name             = 'alt_addr'
                expiry_date_rel       = 1.
    %>
    w i n d o w . o p e n ( " . . / z _ b i z c a r d / p r e v i e w . h t m " ,   " W i n E " ,   " w i d t h = 2 4 0 , h e i g h t = 3 0 0 , t o o l b a r = n o , r e s i z a b l e = no ")
    I was doing something similar...created a controller and a view , was calling the controller from window.open method with all other parameters for sizing etc.
    How to pass a structure conatining data,from controller to the view...
    Now in the onCreate event of the page PREVIEW.HTM in using;
    CALL METHOD cl_bsp_server_side_cookie=>get_server_cookie
      EXPORTING
        name                  = 'FORMFIELDS'
        application_name      = runtime->application_name
        application_namespace = runtime->application_namespace
        username              = sy-uname
        session_id            = runtime->session_id
        data_name             = 'alt_addr'
      CHANGING
        data_value            = alt_addr.
    and in the layout of PREVIEW.HTM in am using this alt-addr:
    But if put a break point at the onCreate event of preview.htm and the execute i get the values in alt_addr but if i execute directly...it is empty in the layout?
    What is the problem?
    Thanks,
    Anubhav.

  • How to get attribute value from standard page ?

    Hi,
    How to get attribute value from standard page ?
    String str = (String)vo.getCurrentRow().getAttrbute("RunId");
    But this value is returning a null value ....
    Can anyone help me to get this attribute value which is actually having a actual value .

    getCurrentRow() would always return null if no setCurrentRow() is used.
    Please check the page design and understand how many rows of VO are there. You can also use the following to get the row:
    vo.reset();
    vo.next();
    Regards
    Sumit

  • How to pass column name as a   values from one page  to another

    hi
    i have created a report(pivot) from a table
    SQL> SELECT * FROM T;
    C1  C2          C3 D                SEQ
    A   AA           2                    1
    A   AB           3                    2
    A   AC           2                    3
    B   AB           5                    4
    B   AC           6                    5
    SQL> SELECT C1
      2  ,NVL(MAX(CASE WHEN C2='AA' THEN C3 END),'') AA
      3  ,NVL(MAX(CASE WHEN C2='AB' THEN C3 END),'') AB
      4  ,NVL(MAX(CASE WHEN C2='AC' THEN C3 END),'') AC
      5  ,SUM(C3) FROM T GROUP BY C1;
    C1          AA         AB         AC    SUM(C3)
    A            2          3          2          7
    B                       5          6         11
    SQL>
    my requirement in Apex is like this(reverse)
    eg-
    when i click on cell values '2' then,it should return
    C1  C2          C3 D                SEQ
    A   AA           2                    1
    {quote}how to pass column name as a  values from one page to another
    for example i have to pass 'c2' as a value to next page{quote}for report pivot you can reffer below link
    Report
    Amu

    thanks for your reply
    i 'm doing what exactly you mention here .
    my problem here is
    i have 15 columns
    i am executing a query based on the values of the column(column name)  in the target page
    1)here i am passing(all) the column values to the next page-but  i want to pass only one column values(column name)
    when i click on any cell of that  column
    OR
    2)i can pass all column name to target page -there(in the target page) i can filter out
    i think option 1 would good if you filter out the unwanted columns
    Regards
    Amul

  • Automatic Row Processing - Preset a value with value from other page

    Hi everybody,
    I have created a form on a table with report. I added a dropdown field to a sidebar region on the first page the groups and selects only a couple of these entries. (Think: only people for the department selected in the drop down field). Now when I click on the normal create button the id field for the department should be filled automatically with the value from the page before, where something was already selected in the drop down field. The id field is a hidden field on the actual create page. Maybe it is not working because the field is linked to the database column to make the automatic row processing work or something. I tried computions on both pages and setting the values. Nothing seems to do the trick.
    Any help would be greatly appreciated.
    Thanks,
    Henrik

    Hi,
    these are the values I currently see:
    108 14 P14_SELECTEDSS Display as Text (escape special characters, does not save state) No
    108 14 P14_CHARACTERISTIC_ID Hidden and Protected Reset to Null No
    108 14 P14_SHAREDSERVICE_ID Text Field 30 Inserted No
    108 14 P14_CAPTION Text Field No
    108 14 P14_CATEGORY_ID Select List No
    108 14 P14_WEIGHING Text Field No
    108 14 P14_DESCRIPTION Textarea No
    I also have to say that I deleted the computations I created earlier again cause they did not work and I had the same values for these variables. I am trying to (pre)set P14_SHAREDSEVICE_ID to P13_SELSS when I click the create button on page 13.
    Thanks again,
    Henrik

  • Why doesn't a Popup Key LOV (named LOV) in a tabular form not display values in the popup?

    I have a tabular form and I'm setting one of the fields to a Popup Key LOV (named LOV). The named LOV is a static LOV. When the popup is displayed there are no values displayed. The same thing happens if I use a Popup LOV (named LOV).
    I created a sample application http://apex.oracle.com/pls/apex/f?p=15762:1that shows what happens. When the job field popup is selected, no items are displayed. If I change the item to a Select List (named LOV) it works fine.
    Is this a bug?

    Hi
    I am also getting the same issue. Hope it could be a bug.
    Can anyone plz confirm this?
    Thanks
    Lakshmi

  • Pass value from one page to another

    Hi All,
    "How to pass the value from one Flex page to anothere Flex
    page".
    In First Flex page contains One Inputtext and one button is
    there.After entering the data in inputtext box,the user clicks on
    the button then get the data from inputtext box and then i need to
    send that value to another flex page and display there.
    Can u tel me plz............
    Thanks & Regards,
    Nagarjuna.

    I believe you are thinking in terms of HTML and traditional
    page coding. As an old school ColdFusion guy I understand it is
    difficult to leave that behind. (at least it was for me.) Unless
    you literally have two different HTML pages that each have their
    own Flex app running in them you do not need to send data from one
    page to the next like you would with Web Forms. (If you are doing
    that you may want to simply write the data to a Shared Object, Pass
    it to a server to store and then feed back into the second Flex App
    when it loads or perhaps use the ExternalInterface to then pass it
    through as a series of URL parameters that can be loaded into the
    next Flex App.)
    In Flex you do not have to worry about loosing state between
    pages because there are literally no pages. Only different views.
    You would not "Send" the value from one page to another. You
    provide a mechanism for the second view to reference the same model
    or data object (most call them ValueObjects) that the first view is
    setting via the form fields.
    You would want to use a ValueObject in the first VIEW and
    then fill the object with the form data using setter methods on the
    object. For example set the fields onChange event to call the
    setter on the object and pass it the form fields value as the
    property. Alternately you could bind the values of the model
    directly to the fields so that they automatically obtain the data
    that is being filled in.
    Depending on how complex of an application you are going to
    build and how scalable it must eventually be you have many
    different options to choose from to allow the second View to use
    the data set but the first. However to make the application
    ultimately more scalable you are going to want to keep your view
    separated from the controller and that separated from the
    Model/ValueObject. (By seperated I mean in different classes.)
    I would suggest looking up the subject of MVC in Flex and
    also the Mediator Design pattern. There are many great sources of
    information.
    Here are a few links that may help with ideas.
    http://flexblog.faratasystems.com/?p=246
    http://pages.cpsc.ucalgary.ca/~heatond/mediator/
    http://livedocs.adobe.com/flex/3/html/help.html?content=introbd_2.html

  • How to pass value from report table to Popup window

    suppose i have a report region
    from query
    "Select * from emp"
    i need to get a popup when i click on the row,
    i need all the columns should be displayed inthe popup window;
    i have written javascript in the report template, by passing #COLUMN_VALUE#
    the issue here is iam only getting the column on which i click,
    is there any way to refer the next column ?
    or am i doing it in wrong manner ?

    Hi Mike,
    Yes what you said is exactly correct ,
    i have a query , but for that i need some PK { three columns } from the the page where this popup will be called,
    i have three columns in the row which makes it as PK,
    now how can i pass three columns from a page to popup ? provided if i click on the row of an table, i want that rows three column to be passed .

  • Apex 3.2, How to use an onchange event with Popup Key LOV - it ignores me.

    Hoping there is a simple solution to this.
    Using Apex 3.2 with a simple form with a few fields. When the user selects a value from a Popup Key LOV, I want to fire a javascript onchange event and alter another field on the form.
    Seems simple enough, except that I can't figure out how to make the PopUp respond to onchange events. The default template seems to ignore javascript entered into the attribute fields that work in other form fields. I know this is simple do to for a select list - it works as expected there. A select list is not a good option because of the huge number of possible returned values.
    Even tried a different approach...to register the onchange event using the "addLoadEvent" with this code (this also does not work):
    function setThisUp() {
    var x = document.getElementById('P105_CTR_ID');
    x.onClick = popupLovChanged;
    function popupLovChanged() {
    alert('OMG IT WORKS!');
    addLoadEvent(setThisUp);
    If any of you have some advice on how to make onchange work, it would be greatly appreciated.
    Thanks in advance
    -Rich

    For those still looking for a solution.
    I found that you can overwrite the default javascript function passback(x) in the popup lov's template, just add your function in the After Field Text field of the template
    e.g.
    <script> function passBack(x) {
    opener.document.getElementById('P2_PROGRAMME').value = x;
    opener.document.getElementById('P2_PROGRAMME').focus();
    close();
    } </script>
    this is going to populate the 'P2_PROGRAMME' field with selected value, and focus on it.
    in your case, just add the codes you want to run into the passback function.
    hope this helps

  • Popup KEY LOV in Interactive Report not work as expected

    Hello,
    in an Interactive Report, i have added in a Region a Popup Key LOV (Displays description, returns key value). This LOV works ok in other Forms. But in the Report item (Session State variable) instead of returning the Return Value of the LOV, it returns the Displayed Value (inspected the Session). How can i make it work as expected ?
    TIA

    At the moment, i am ok with all the functionality of the IR, which is finished. What i want is to use some extra items on the upper part of the page that aid the user to restict in large part the IR query result. Some of these are ideal candidates for LOVs - I want LOV to diplay the Display values and after user selection to return the Return value, either to page item or to other variable. How can i achieve this? Any idea? So far the LOV returns the display value in the Item AND session corresponding variable.

  • Use value from tabular form column in the LOV where clause of another column

    Hi
    Using APEX 4.2 on 11g
    In a tabular form I want to filter the values in a Popup Key LOV based on the value of another column (same row).
    i.e. I want to get the value of one column and use it in the where clause for the Popup LOV on the same row.
    e.g. where COL 2 is a popup LOV
    COL 1
    COL 2
    1
    LOV SQL: SELECT a FROM b WHERE c = <value from COL 1>
    2
    LOV SQL: SELECT a FROM b WHERE c = <value from COL 1>
    3
    LOV SQL: SELECT a FROM b WHERE c = <value from COL 1>
    The value in COL 1 does not change once the row is created. It is a hidden ID field.
    Is this possible?
    Nick

    Anyone have any ideas?
    I thought getting the value from one column and using it in another column would be commonly used functionality... I just can't seem to work it out.

Maybe you are looking for

  • How do I reduce size of PDF?

    The pdf for my community newsmagazne has 16 pages. When I send it to the company which prints it, I get the message - PDF is 40.7 MB - exceeds 20.0 MG used by this server. Print size is 100%. I send PDF as Best - Better is not good enough. What can I

  • Alps Pointing device scrolls but won't go back or forward in Firefox, but works in Internet Explorer

    Alps Pointing device touch pad, version 6.0.304.6, on my Toshiba Qosmio G25-AV513 running WinXP up to date , scrolls but won't go back or forward in Firefox, but fully works in Internet Explorer. I tried installing the latest driver available from To

  • N-comp compilation of an Java Stored Procedure

    I am working on Oracle 9.2.0.2 Enterprise Server running on Windows 2000 Advanced Server SP3. I am trying to compile (N-comp) a Java Stored Procedure. It throws up quite a few errors. Normal deployment works fine. Oracle has acknowledged the error &

  • Groovy accessor to another entity

    version adf 11.1.2.2.0. i want to access another EO's attribute. i create two EOs(Employee and Department). and create an association (departId) accesor: Dept , Emp. the Groovy Expr in SalaryLoc of EmployeeEO is Dept.max("LocationId"). but it always

  • I want to buy a retina display mac, Help!

    Hi, I am student in my 11th grade, I wanna purchase a new macbook pro retina, i sold my old one for 1200. Coming to the point i need to decide upon the storage: 128 or 256GB. Please help, I primarily want to use it for school, some games and movies.