Call popup, make selection, re-execute query problem

Hi all,
I searched and searched, but can't quite figure out how to do this. The javascript/AJAX examples just get me completely lost.
I have a search page. On the search page I want to allow the users to save and subsequently retrieve a search. I have the part to save search working fine. But, I am having a devil of a time getting the retrieve search functionality to work.
The popup works fine, and displays the saved searched for that user, and I can get the sequence number of the search returned back to the calling page. But, now that the calling page has the sequence number, I need to submit the page (or whatever is needed for a PPR region), so that it checks to see if the sequence number field is null or not. If it's not null, then query the saved search table to extract the query condition, plug that in to the where clause, and re-execute the query to repopulate the region.
I have a quasi-working example of what I'm trying to do at on the apex.oracle.com site at http://apex.oracle.com/pls/otn/f?p=11772:3 (if needed, the application is called "test problem", page 3). Due to how my search functionality is setup, using Oracle text, I can't get a 'real' search to perform, so I'm 'faking it' with just a "select *..." on the site.
Workspace: wbfergus
username: htmldb
password: htmldb
Any help or guidance is greatly appreciated. Thanks,
Bill Ferguson

Well, I've finally got it to return the SEQ from the popup onto the calling page and then have the calling page submit.
However, I now have some other kind of problem that's really vexing me. I've turned on debug so I can see how the page is getting rendered, at up near the top it explicity states:
0.01: ...Session State: Saved Item "P3_SEQ" New Value="121"
However, I have a region that is based on a PL/SQL function returning a query:
declare
v_stmnt varchar2(4000) := null;
v_where varchar2(4000) := null;
v_area  varchar2(4000) := null;
begin
if :P3_SEQ IS NULL THEN
--if apex_application.get_current_flow_sgid(:P3_SEQ) IS NULL THEN
   v_where := :P3_WHERE_CLAUSE;
   v_area  := :P3_AREA_SEARCH;
   htp.p('P3_SEQ is NULL');
   htp.p('');
else
   SELECT where_clause, search_area
   INTO   v_where, v_area
   FROM   playlist
   WHERE  seq = v(':P3_SEQ');
   htp.p('P3_SEQ = '||:P3_SEQ);
   htp.p('');
end if;
--v_where := 'XYZ';
v_stmnt := 'SELECT   dep_id, dev_st, oper_tp, sig, NAME, ';
v_stmnt := v_stmnt||'commod, commod_group, ';
v_stmnt := v_stmnt||'MIN (usgs_num) KEEP (DENSE_RANK FIRST ORDER  BY mt_rec ASC) usgs_num, ';
v_stmnt := v_stmnt||'MIN (model_name) KEEP (DENSE_RANK FIRST ORDER  BY mt_rec ASC) model_name, ';
v_stmnt := v_stmnt||'MIN (country) KEEP (DENSE_RANK FIRST ORDER  BY l_line ASC) country, ';
v_stmnt := v_stmnt||'MIN (state_prov) KEEP (DENSE_RANK FIRST ORDER  BY l_line ASC) state_prov, ';
v_stmnt := v_stmnt||'MIN (county) KEEP (DENSE_RANK FIRST ORDER  BY l_line ASC) county, ';
v_stmnt := v_stmnt||'MIN (lat_dec) KEEP (DENSE_RANK FIRST ORDER  BY g_line ASC) lat_dec, ';
v_stmnt := v_stmnt||'MIN (lon_dec) KEEP (DENSE_RANK FIRST ORDER  BY g_line ASC) lon_dec, ';
v_stmnt := v_stmnt||'mas_id, mrds_id ';
v_stmnt := v_stmnt||'FROM     NEW_MASTER_QUERY1 ';
v_stmnt := v_stmnt||'WHERE    dep_id IN ';
v_stmnt := v_stmnt||'    (SELECT dep_id ';
v_stmnt := v_stmnt||'     FROM search_table where '||v_where||' ';
v_stmnt := v_stmnt||v_area||') ';
v_stmnt := v_stmnt||'GROUP BY dep_id, dev_st, oper_tp, sig, NAME, ';
v_stmnt := v_stmnt||'commod, commod_group, mas_id, mrds_id';
htp.p(v_stmnt);
return v_stmnt;
END;It always acts as if :P3_SEQ is null, and is confirmed by the htp.p output. But the page explicity knows that :P3_SEQ is not null.?.?
This is just on my local copy of the app, I'll see if I can put together something on apex.oracle.com that does the same thing. My default query on my app uses Oracle Text, so simulating it requires a bit of extra work.
Thanks,
Bill Ferguson

Similar Messages

  • Execute Query Problem (Urgent)

    Hi,
    I have created customized horizontal toolbar. There I placed the buttons
    1. Enter Query
    2. Execute Query
    3. Cancel Query
    When I press the Enter Query Button "Go_Block(My_Block) ; Enter_Query ;", it works fine and goes into enter query mode, but when i click Execute Query button "Go_Block(My_Block) ; Execute_Query ;" it does not work and show me the message Press Ctrl+F11 to execute or F4 to Cancel query.
    any solution plz.
    Faisal.

    I am assuming you are using FORMS6i Client/Server (big assumption these days I know but here goes...!!)
    From your reply I think you misunderstood my suggestion!
    When you moved the button into your query block, you discovered the problem! As the button (and current focus) is in the query block, the query can now execute successfully.
    When the button is in the button block with MOUSE_NAVIGATE property set to TRUE, pressing the button will move CURRENT FOCUS back to this block and therefore the query cannot execute.
    You have to set MOUSE_NAVIGATE property on the button to FALSE.
    If you are still struggling, email me to save time!!
    [email protected]

  • Execute Query problem in viewing the Image

    Hi all,
    I've created a table with the following command
    Create table test (id Number(5),img_File Blob);
    Now i've created a form, where in the I've placed two fields (id and Img_File). The data type for the Img_File field is Image Item. I'm able to see that it is getting saved.
    I've seen it using the toad that the data is being inserted into the table. When i try to press f7 and then f8(i.e.., Enter Quey, Execute Query). I'm getting the following error.
    ORA-00932: inconsistent datatypes: expected got
    My block is based on the table. I'm using Forms 6i, Windows XP. My doubt is why the error is not showing the datatype (for Ex. Expected Number got date).
    If any one has worked on the Blob, then can suggest me.
    Regards,
    Alok Dubey

    Hi,
    Thanks for your replies. I've used Long Raw data type for the image column. it started get queying.
    i've a doubt that whether it is same in Forms 6i and Forms 10g also(i.e.., Both the versions use the Long for the images). As BLob has more advantages than
    the Long raw. As this is the Oracle recommendation, I want to use Blob. Is there any work around to it.
    Regards,
    Alok Dubey

  • Execute query problem

    hi,
    i need to know the flow of triggers when the keys F7 and F8 are being pressed.
    means when i press F7 and F8 which are the triggers getting fired and in which order.
    thanks in advance...

    In Forms 6i (10gR2 is different)
    F7 = enters query = DO_KEY('ENTER_QUERY')
    F8 = execute query =DO_KEY('execute_query')
    Hit two times F7 and you can see yours inputs.
    Regards

  • Execute Query from LOV

    Hi
    There is a Button that run LOV(Show LOV) ,
    how could make the Form Execute Query According to the user Selection from that LOV?
    Thanks

    hi
    Thank you Rahamath and thank you Joachim
    -Create non database item (Item_A). (As you told me Rahamath)
    -Used the LOV to return the value at non database item
    (Item_A) . (As you told me Rahamath)
    -Create Global variable (g_var). (as you told me Joachim)
    -At the trigger When_Button_Pressed I wrote :
    if show_lov (my_lov) then
    go_block('database_block');
    :global.g_var :=:block.Item_A;
         Execute_Query;
    End if;
    - Create Pre_Query Trigger at database block level
    (as you told me Joachim)
         if :global.g_var is not null then
    :id := :global.g_var,
    :global.g_var := null;
    end if ;
    so finally its work
    Thank you a lot for all of you
    bye
    mahmoud

  • Problem in executing query in browser and bex analyzer

    i am not able to execute query in browser nor bex analyzer...
    problem is that i dont have option to run in bex analyzer in query designer (menu bar seems missing in query designer and how can i get enabled
    and when execute the query in browser using bex query designer ..it prompts me with following error
    URL http://saperpdev.saperpdev.com:8002/sap/bw/BEx call was terminated because the corresponding service is not available
    Note
    ■The termination occurred in system ERD with error code 403 and for the reason Forbidden.
    ■The selected virtual host was 0
    ErrorCode:ICF-NF-http-c:000-u:SAPSYS-l:E-i:SAPERPDEV_ERD_02-v:0-s:403-r:Forbidden
    and i tried to open the query from bex analyzer  level
    it prompts me as follows
    macros are disabled because the security level is set to high and digitally signedtrusted certificate is not attached to the macros,to run the macros change the security level to lower settings
    pls suggest me

    hi suman,
    thanks for your response.. but let me be more clear
    i am using sap gui 7.20 front end and when i execute rrmx i am able to navigate to BEx analyzer but when i tried to open a report which i create i get following error message..
    you do not have sufficient authorization for infoprovider zic_proj
    function module  /SDF/AL_MAP_TRANSID_LOGH doesnt exit
    second thing is that i tried from bex query designer to execute the report ..but i am not able to execute the report...
    i hope some connections seems missing..please let me know what to do ASAP..
    and where can i post this question to get fast reply

  • Problem in Execute query on non-database block and database block together

    Hi All,
    In my form,i have
    1. First block is Non-database block with one non-database item.
    2. Second and third blocks are database blocks.
    Now the problem is that i want to perform execute-query for all the blocks.
    If the cursor is on the non-database item of 1st block and i clicks on the "Enter-query" then i am getting message " This function can not be performed here".
    If i click on the item of the database block and then clicks on the "Enter-query" and then "execute-query" it's working fine.
    But i don't want to do in this way.
    My cursor will be on the First block only and then it should perform execute-query.
    I am using this non-database item to copy value of this item to the item of the database block item.
    I think i make you understand about my problem.
    I am using forms 10g on Window xp.
    Please help me.

    Hi!
    Simply create a enter-query trigger on the non-database-block:
    begin
    go_block ( 'database_block' );
    enter_query;
    end;If your search criteria is in the non-database-item in the first block,
    you actually do not need the enter_query build-in.
    Just create a execute-query trigger on the first block like:
    begin
    go_block ( 'database_block' );
    execute_query;
    go_item ( :System.trigger_item );
    end;And in a pre-query trigger on the database-block copy the
    value of your seach item into the item you want to search for.
    Regards

  • Problem class important error while executing Query from favorites

    Hi Experts,
    1. I have tried execute the query from favorites it is showing the error message. " Problem class important"
        In the message text: logs showing error message [Attached the message screenshot].
    2. From "Query Designer" Execute [Ctrl+R] gives the error "500 Internal Server Error" [Attached the screenshot]
    3. Able to execute the reports from RRMX.
    No ST22 dumps. Can any one suggest about...how to rectify the errors.
    Thanks in advance...Surya

    Need tyo make sure the problem is with the query/workbook are general issue with all workbooks/query.
    1. Make sure the base query of work book is still executable. RRMX/RSRT.
    2. Execute the work book in Bex/Excel and look for definition of workbook; there might be some thing in the workbook referencing other than base query.
    3. If other workbook are also not working? need to check if other users have same issue.?
    Hope this will help to narrow the problem.
    Gopi

  • I have just bought my iphone 4S 32GB from three weeks ago and 'am facing a problem that in the middle of my calls it suddenly says call failed and it keeps on doing it every call i make

    I have just bought my iphone 4S 32GB from three weeks ago and 'am facing a problem that in the middle of my calls it suddenly says call failed and it keeps on doing it every call i make .. I Don't know what to DO Please anyone help me i've got OS 5.0.1 and it's factory unlocked i've boughted from USA and it was sent to me where 'am living now in Egypt ...ANy Helpppppppppp Pleasee

    try general>settings>reset>reset all settings and start up as an new phone.

  • How to make required field on selection screen in Query

    i'm now working with query(SQ01).
    but don't know how to make required field on selection screen in Query.
    thanks in advance

    i'm now working with query(SQ01).
    but don't know how to make required field on selection screen in Query.
    thanks in advance

  • Problem with 0FIGL_VC1 when use constant selection in the query

    Please kindly help me. I have this problem for 2 weeks already.
    When I create a query from virtual cube 0FIGL_VC1 (balance sheets / p&l statements), if I use constant selection in any of key figure, my report could not display financial statment correctly. 
    My report layout
    Columns :  key figures  (including 0FIGL_VC1_CK001)
    Rows:  0GLACCEXT  (financial statement item) << as hierarchy
    Initially, the query is processed correctly.
    However, based on the requirement from my customer, I really have to use "constant selection" for some of my columns. Whenever I do so, the query display incorrectly. (Some nodes of financial statement item just disappear. (it seem like all contra item will disappear.)  
    Please help!

    If I dont use constant selection in the query, data are display correctly.
    But If I use constant selection in the query, some financial statement item dont display any value
    Example :
       Financial statement item(Display in hier)     Period1   Total Period1(Constant selection)
                 A                                                       10            60
                 B                                                       20            60
                 C                                                       30            60
                 D                                                       0              60
    - Financial statement item "D"  has some value.
    - Financial statement item "D"  is in the hierarchy,one gl account has been assigned to more than one group differentiated by debit/credit indicator.
    Please help!!

  • Query to find first and last call made by selected number for date range

    Hi,
    query to find first and last call made by selected number for date range
    according to filter:
    mobile_no : 989.....
    call_date_from : 25-april-2013
    call_date_to : 26-april-2013
    Please help

    Hi,
    It sounds like you want a Top-N Query , something like this:
    WITH    got_nums   AS
         SELECT     table_x.*     -- or list columns wanted
         ,     ROW_NUMBER () OVER (ORDER BY  call_date      ) AS a_num
         ,     ROW_NUMBER () OVER (ORDER BY  call_date  DESC) AS d_num
         FROM     table_x
         WHERE     mobile_no     = 989
         AND     call_date     >= DATE '2013-04-25'
         AND     call_date     <  DATE '2013-04-26' + 1
    SELECT  *     -- or list all columns except a_num and d_num
    FROM     got_nums
    WHERE     1     IN (a_num, d_num)
    ;This forum is devoted to the SQL*Plus and iSQL*Plus front ends. This question doesn't have anything to do with any front end, does it? In the future, you'll get better response if you post questions like this in the PL/SQL.
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only), and also post the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
    See the SQL forum FAQ {message:id=9360002}

  • While Executing Query  with out giving any inputs  to selection variables

    Hi,
    While Executing Query   in the Query Designer  with out giving any inputs  to selection variables.  I got an error message  in german Language this is translating of german to English .
    In the reading of the data, mistakes appeared.  Navigation the value is contains possible "New Delhi" of feature 0CITY40 at that
    10. ten place a mistake Notification Number BRAIN 290
    This is very urgent  can you please help me .
    Thanks & regards
    Subba Reddy.

    Double click this error message it will give you more details. Post that.

  • Call selectlist inside select query

    Can i call selectlist in side select query.
    example: select empno,p1_job,sal from emp;
    in this job_lov is having the following query.
    select job from emp;
    this lov is attached one text item p1_job.
    p1_job should be called as drop down in side the query. How can i call select list.
    please help

    I forgot to mention that there is no relation between lov and emp table.
    Example job is not there in emp. it is completeley independent select list.
    select emp,p1_job,empno from emp.
    but there is no relation between p1_job and emp table.
    it is completeley indepent select list.
    lov query is select job from jobs;
    Edited by: 893185 on Apr 2, 2012 11:25 AM

  • WHEN-TREE-NODE-SELECTED need 2 Execute-Query on Master-Detail data block

    I optimize tree using this link
    http://andreas.weiden.orcl.over-blog.de/article-29307730.html_+
    For huge amount of data (Accountings)
    All i need for now is
    WHEN-TREE-NODE-SELECTED need 2 Execute-Query on the data block
    DECLARE
    htree ITEM;
    node_value VARCHAR2(100);
    BEGIN
    IF :SYSTEM.TRIGGER_NODE_SELECTED = 'TRUE' THEN
    -- Find the tree itself.
    htree := FIND_ITEM ('BL_TREE.IT_TREE');
    node_value := FTREE.GET_TREE_NODE_PROPERTY( htree, :SYSTEM.TRIGGER_NODE ,  ftree.node_value  );
       GO_BLOCK ('GL_ACCOUNTS');
       set_block_property('GL_ACCOUNTS', DEFAULT_WHERE , 'ACCOUNT_ID ='|| node_value  );
    EXECUTE_QUERY;
    END IF;
    END;The above code is working fine 4 the detail block which is *'GL_ACCOUNTS'*
    when i substitute is Master block which is 'GL_ACCOUNTS_TYPES' it doesn't display all data
    Help is Appriciated pls.
    Regards,
    Abdetu...

    Hello
    In WHEN-TREE-NODE-SELECTED i modified the following code :_
    DECLARE
            htree ITEM;
           node_value VARCHAR2(100);
           parent_node FTREE.NODE;
    BEGIN
      IF :SYSTEM.TRIGGER_NODE_SELECTED = 'TRUE' THEN
      -- Find the tree itself.
      htree := FIND_ITEM ('BL_TREE.IT_TREE');
      -- Get the parent of the node clicked on. 
                  parent_node := FTREE.GET_TREE_NODE_PARENT ( htree, :SYSTEM.TRIGGER_NODE );
           GO_BLOCK('GL_TYPES');
                set_block_property('GL_TYPES', DEFAULT_WHERE , 'TYPE_ID ='|| parent_node  );
                  EXECUTE_QUERY;
      -- Get the detail of the parent node
          node_value := FTREE.GET_TREE_NODE_PROPERTY( htree, :SYSTEM.TRIGGER_NODE ,  ftree.node_value  );
               GO_BLOCK('GL_ACCOUNTS');
               set_block_property('GL_ACCOUNTS', DEFAULT_WHERE , 'ACCOUNT_ID ='|| node_value  );     
                   EXECUTE_QUERY;
          END IF;
    END;
    FRM-40350 : Query caused no records to be retrieved but i have records in the data base ...!
    Well, Do u think that's because in ur package i retrieve only the detail block ?
    Regards,
    Abdetu...

Maybe you are looking for

  • Problem/Bug in IE7/EM combination

    Good morning, Just as an FYI, When using IE7 Version 7.0.5730.13 and EM (as installed by the download available from Oracle), it is not possible to do a CTAS in the "Create Table" page of EM. This is because the drop down list labeled "Define Using"

  • On conversion error, bindings in a 'datatable' disappear.

    Heres the senario, I have images that are conditionally rendered. When a button is pressed and there is a conversion error all the images disappear (the ones that should show). There are other bindings also that disappear. The images are in a datatab

  • OIM 11g: Process Form "Account Name" and "AccountID" properties

    Does anyone know where and/or how these column properties are used within OIM? I could not find documentation on them anywhere.

  • Photoshop wont allow me to create a 3d extrusion or mesh layer

    Daniel Montgomery Jun 8, 2014 9:51 AM (in response to Daniel Montgomery) Ok, I wasn't able to take a snip shot of the 3d drop down menu.... when i do select the 3d tab, new 3d extrusion and from selected layer and new mesh from layer are both highlig

  • Problem in J1IJ

    Dear Friends, There are two STOs and MIGOs - J1IG  were done.  In one sto qty is 10 and in the second sto qty is 5.  After that there is an order - delivery - PGI also done.  While doing J1IJ we are selecting both the excise invoices so the quantity