How use enter query what writh in enter_query button

hi master
i hae three text box dept block and other in emp block table such as
in dept block
deptno
dname
loc
i have three button
enter_query
execute_query
exit
if my user put 20 in dept.deptno and press then enter_query button
and press execute_query button
please give me idea what i write in enter_query button
thanking You
Aamir

You can read about Pre-Query trigger in the Forms on-line help:
About controlling queries with Pre-Query and Post-Query triggers
The Pre-Query and Post-Query triggers allow control over query processing. They can be defined at the form or block level. Most often, attach them to specific blocks to control the query functionality of those blocks.
The Pre-Query trigger fires just before Form Builder issues the SELECT statement to the database, after the operator has defined the example record by entering query criteria in Enter Query mode.
Inside a Pre-Query trigger, the example record defined by the query criteria is the current record. This means that trigger code can read and set the values of items in the example record using standard :block_name.item_name syntax.
A Pre-Query trigger can be used to disallow query conditions that might be invalid. When a form is in Enter Query mode, normal validation is suspended and no validation triggers fire as they do in Normal mode. The Pre-Query trigger thus allows you to verify that any values entered by the operator are valid query conditions.
When invalid query conditions have been entered, you can abort the query by raising the FORM_TRIGGER_FAILURE built-in exception in the Pre-Query trigger.
You can also call SET_BLOCK_PROPERTY to modify the block's WHERE and ORDER BY clauses from within the Pre-Query trigger, to further restrict or order the records the query will retrieve.
I hope this will help you.
Helena

Similar Messages

  • Using Enter-Query Mode Programmatically

    A question was raised in an earlier thread
    QUERY CRITERIA MANAGER
    about how to use Enter-Query mode programmatically in a way that doesn't stop
    and prompt the user to enter a query after switching from Normal mode to Enter-Query mode.
    Since the solution may not be widely known, I thought I'd demonstrate the technique here in a new thread.
    Create a simple form with just two blocks. Using the data block wizard, create an EMP block with one
    text item for ENAME. Place it on the canvas. Create the other block as a control block and name it CONTROL.
    Inside the control block create the following items:
    - create a text item named TXT_BOX
    (The user will enter their search pattern criteria in this text box while in Normal mode.)
    - create a push button item named EXECUTE_QUERY
    (This button will switch to Enter-Query mode, execute the query, then return to Normal mode.)
    Place both control items on the canvas.
    Inside the WHEN-BUTTON-PRESSED trigger for the EXECUTE_QUERY button, enter the following code:
    DECLARE
         timer_id TIMER;
    BEGIN
         :GLOBAL.search_criteria := :CONTROL.TXT_BOX;
         GO_BLOCK('EMP');
         timer_id := CREATE_TIMER('ENT_QRY', 1500, NO_REPEAT);
         -- 1500 may be a little long, but provides a margin of error
         ENTER_QUERY;
    END;
    Next, create a WHEN-TIMER-EXPIRED trigger at the form level. Inside this trigger enter the following code:
    If GET_APPLICATION_PROPERTY(TIMER_NAME) = 'ENT_QRY' THEN
         :EMP.ENAME := :GLOBAL.search_criteria;
         EXECUTE_QUERY;
         IF :SYSTEM.MODE = 'ENTER-QUERY' THEN
              EXIT_FORM; -- return to Normal mode
         END IF;
    END IF;
    GO_ITEM('CONTROL.TXT_BOX');
    Now, when the user runs the form and logs into the SCOTT schema, he enters a search criteria
    such as A% in the TXT_BOX while in Normal mode. Then clicks the EXECUTE_QUERY button.
    The form will switch to Enter-Query mode, retrieve all names in ENAME that begin with the letter A,
    and then return to Normal mode without pausing for the user to enter a search criteria.
    If the query should happen to fail, the form displays the error:
    "FRM-40301: Query caused no records to be retrieved. Re-enter."
    then switches automatically back to Normal mode so the user can try entering a new criteria.

    I'm showing how to do it when switching modes. I'm
    not suggesting this is the best way to do a query.We need to look at this in the context of the original probelm in the thread linked to above. For most cases the when-timer-expired etc is just a huge detour around using the pre-query trigger but it's an interesting approach to the specific problem in the earlier thread. The OP there wanted to be able to type '>5000' into a number field in a non-database block, which we can do in a database block in enter-query mode, and use it as a query parameter in the database block. Perhaps if we enter this into a character field in the non-database block and populate the numeric field in the database block whilst in enter-query mode then we can do searches on ranges of data? Unfortunately it doesn't work - you get an ora-06502 error just like you do when using the pre-query trigger. For the situation in the original thread you would have to use a 'default where'.

  • Enter query - what was changed (entered) in enter query mode

    Hello,
    I need to know what criteria (values and items) an user entered (typed) when my form is in enter query mode.
    Thanks

    You can read about Pre-Query trigger in the Forms on-line help:
    About controlling queries with Pre-Query and Post-Query triggers
    The Pre-Query and Post-Query triggers allow control over query processing. They can be defined at the form or block level. Most often, attach them to specific blocks to control the query functionality of those blocks.
    The Pre-Query trigger fires just before Form Builder issues the SELECT statement to the database, after the operator has defined the example record by entering query criteria in Enter Query mode.
    Inside a Pre-Query trigger, the example record defined by the query criteria is the current record. This means that trigger code can read and set the values of items in the example record using standard :block_name.item_name syntax.
    A Pre-Query trigger can be used to disallow query conditions that might be invalid. When a form is in Enter Query mode, normal validation is suspended and no validation triggers fire as they do in Normal mode. The Pre-Query trigger thus allows you to verify that any values entered by the operator are valid query conditions.
    When invalid query conditions have been entered, you can abort the query by raising the FORM_TRIGGER_FAILURE built-in exception in the Pre-Query trigger.
    You can also call SET_BLOCK_PROPERTY to modify the block's WHERE and ORDER BY clauses from within the Pre-Query trigger, to further restrict or order the records the query will retrieve.
    I hope this will help you.
    Helena

  • Display Item cleared when using 'Enter-Query'

    Hi all,
    i am going to develop a multilanguage application with very
    special heading texts using display items for these headings.
    BUT- if I press EnterQuery, they are cleared also.
    How can I restrict cleanup of these display items used as
    headings ?
    I was looking in the properties, but no idea.
    Thanks for help,
    udo

    I'm showing how to do it when switching modes. I'm
    not suggesting this is the best way to do a query.We need to look at this in the context of the original probelm in the thread linked to above. For most cases the when-timer-expired etc is just a huge detour around using the pre-query trigger but it's an interesting approach to the specific problem in the earlier thread. The OP there wanted to be able to type '>5000' into a number field in a non-database block, which we can do in a database block in enter-query mode, and use it as a query parameter in the database block. Perhaps if we enter this into a character field in the non-database block and populate the numeric field in the database block whilst in enter-query mode then we can do searches on ranges of data? Unfortunately it doesn't work - you get an ora-06502 error just like you do when using the pre-query trigger. For the situation in the original thread you would have to use a 'default where'.

  • How do I change what the middle mouse button/wheel does?

    I feel like an idiot asking this, but I can't figure this out...
    I've plugged in a bog standard 2 button + scroll wheel third button mouse, but I can't get the middle mouse button/wheel to behave like it would in Windows.  If I click it, it changes programs, hold it it brings up the task switcher thing.  It's like I'm pressing command + tab.
    I want it to work normally, where the program I'm using the middle button responds, not the OS.  Like in Firefox, I want to be able to close tabs with the middle mouse button, and open new links with it...instead all it can do is switch programs.
    Is there a way to do this?  Am I missing something obvious?

    Err...I don't know what happened, but I rebooted and now it's working like normal (knock on wood!).  Noooo idea how it ended up in that state!

  • Open multiple forms, few in Enter-Query mode

    Hi All,
    I want to open multiple forms from a form using open_form built-in. If user clicks on different items of the parent form different child forms are invoked.
    But if one child form is opened in Enter-Query mode (I have 'enter_query;' in its when-new-form-instance) it does not allow to put focus back on parent form and invoke other forms until I execute_query in child form or close the child form.
    Waiting for your replies. Thanks in advance.
    Regards
    Mona

    Hi Friends,
    Has anybody ever faced this problem. Please reply.
    Regards

  • Enter query problem -please help

    Hello guys,
    Currently i am facing one problem.I have a from which is showing first three cols of emp table(empname,empno,dept).The form has one button.When user is pressing that button user can see more information about the employee.The form which is showing the details of the employees is a new form.This form has another button called return.When user is pressing that button the user can see first form.
    In the return button i have written the code
    exit_form.
    but the problem is after returning to the the form when i am pressing the enter query button it is throwing the error
    41003-this function can not be performed here.
    But after clicking on emprow when i am pressing enter query button it is running fine.
    Can anybody please tell me how can i use enter query button without clicking on the empno row.
    Thanks
    Rajat

    Rajat,
    Sounds like when you exit your detail form the focus is not returned to a database block/item. In order to enter "Query" mode, the focus must be on a "Queryable" item. One solution would be to code your Form level Execute-Query trigger to move the focus to the EMP block and then execute_query(). For example:
    BEGIN
       GO_BLOCK('EMP');
       EXECUTE_QUERY();
    END;Hope this helps.
    Craig...
    -- If my response or the response of another is helpful or answers your question please mark the response accordingly. Thanks!

  • FRM-41361 Cannot navigate out of current form in Enter-Query Mode

    Hi All,
    I am getting the FRM-41361 error in the bottom message area when opening a form from the function navigator. The issue does not exist when opening the form from the application homepage. The form is loaded in enter-query mode, and the enter_query command is in the WHEN-NEW-FORM-INSTANCE trigger. I have checked all triggers that fire after this point for any type of navigation but do not see any. The interesting thing is, if I put a fnd_message.set_string and fnd_message.show just before the enter_query call to debug, the issue goes away entirely.
    Is it possible there are security triggers firing after the form is loaded into enter-query mode that could be causing this and that the fnd_message calls are indeed buying time for those triggers to complete before the enter_query call?
    Any help/advice is appreciated. Thanks!
    Dan

    Yes, when I looked through the triggers I made sure to look for go_block and go_item calls as well as any calls to leave the form.

  • TopLink doesn't sort data received using Named query

    Hello!
    I'm trying to build a Tree table using a TopLink Named query in my application.
    There are Id, Parent|_Id, Code and Name columns in the corresponding database table, where Id and Parent|_Id are linked together by Foreign key (typical tree). I used TopLink to describe this table in the Model part of my application. There I wrote a Named query, without using a query constructor (not Expression radio button, but SQL radio button). Here the text of query:
    select * from regions a connect by prior a.Id = a.Parent_Id start
    with a.Id is null order by a.Code
    Then I created a Data control and tried to build a JSF page with data based on this query, as tree-table.
    But I discovered the fact, that data under the same node on the same leaf level of the Tree are not sorted by code on the JSF page. For example, data may be situated as follows (Code - Name):
    2. wwwwwwwwwwww
    2.3.kkkkkkkkkkkk
    2.1.fffffffffffffffffffff
    2.2.oooooooooo
    1. qqqqqqqqqqqqqqqq
    1. 2. lllllllllllllllllllllllllllll
    1. 1. hhhhhhhhhhhhhh
    etc.
    I verified this query on other environment (PL/SQL Developer, SQL+), but didn't found such unsorted results anywhere.
    Please, give me an advice to avoid this problem.
    Thanks.

    Hi
    Something to do with TreeMap(TreeSet). I tried with TreeSet but it didn't work. Here is the code :
    In servlet :
    Connection lConnection = getConnection(pRequest);
    String lSQL = "";
    Statement lStatement;
    ResultSet lResultSet;
    Hashtable lLtypeHashtable = new Hashtable();
    lStatement = lConnection.createStatement();
    lSQL = "SELECT RCID,RCMEANING FROM REFERENCECODES WHERE RCDOMAIN = 'LOCATIONTYPE' AND RCROWSTATE > 0 order by RCMEANING";
    lResultSet = lStatement.executeQuery(lSQL);
    while(lResultSet.next())
    String lRcid = lResultSet.getString(1);
    String lRcmeaning = lResultSet.getString(2);
    lLtypeHashtable.put(lRcid.trim(),lRcmeaning.trim());
    if(lResultSet != null) lResultSet.close();
    if(lStatement != null) lStatement.close();
    pRequest.setAttribute("LtypeHashtable",lLtypeHashtable);
    //Below Query is executed when one data from select element is selected
    String lLType = DisplayUtilities.getString(pRequest.getParameter("LType"),true);
    //LType is name of select element in JSP.
    if (lLType != null)
    lSQL = lSQL + " AND " + lUpperCaseFunction + "(LOCATIONTYPE)" +
    " = " + DBUtilities.formatString(lLType.toUpperCase());
    pRequest.setAttribute("rLType",lLType+"");
    In JSp :
    <%
    Hashtable lLtypeHashtable = (Hashtable)request.getAttribute("LtypeHashtable");
    %>
    <TR>
    <TD width="15%"> <div align="left">
    <select name="LType" size="1" >
    <option Value="">< Select ></option>
    <%
    if(lLtypeHashtable != null)
    Enumeration enum = lLtypeHashtable.keys();
    while(enum.hasMoreElements())
    String key = (String)enum.nextElement();
    String value = (String)lLtypeHashtable.get(key);
    String flagBack = "";
    if(key.equals((String)request.getAttribute("rLType")))
    flagBack = "selected";
    %>
    <option Value="<%=key%>" <%=flagBack%>><%=value%></option>
    <%
    %>
    </select></div>
    </TD>
    </TR>
    How should I implement TreeSet?
    Looking forward for an early reply.
    Thanks.

  • How to implement enter-query , execute-query in Apex Forms

    Hi,
    I am new to Oracle Application Express. I want to know what is the equivalent of ENTER-QUERY and EXECUTE-QUERY features of Oracle Forms in Oracle APEX? I saw a lot of documentation, but everywhere I found that APEX forms only have 3 database actions, (1) INSERT (2) UPDATE & (3) DELETE.
    Does anybody know how we can do QUERY in APEX Forms? (like we do in Oracle Developer Forms).
    Thanks in advance.

    Oracle APEX is a web/ stateless environment. So you do not have the same functionality/ features as in a Oracle Forms environment which is session/state oriented.
    You can however achieve functionality similar to Enter Query / Execute Query through other means.
    The easiest is to use the Forms with Report wizard. It creates 2 pages, the first one is a report and the other a Form. Clicking on the Report rows takes you to the Form page in Edit mode where as the the Create button takes you to the Form in Insert mode.
    If you want to have the enter-query / execute query on a single page it will require significant effort and skills. Try it when you have acquired some more skills in Apex.
    In APEX , like any other web application, you have to think in the web paradigm and not client-server. Even Forms 11g is essentially client-server like and is session oriented through the forms applet.
    Regards,

  • How to enter /559 in Adhoc query?

    How can we enter Secondary wage types in Adoc query? Step by step

    Hi,
    You can download the Employee wise Bank Details of IT0009 or using Adhoc query
    You have employee wise WT reporter
    Now do a Vlookup with the Employee Wt report  and the Adhoc query.
    If you have problems in vlookup
    pls send both the files to me on hemant.mahale capgemini com
    Regards
    Hemant V. Mahale

  • How to use power query with sitecatalyst

    Hello,
    I need to use power query to import a table from sitecatalyst. Doing some tests I found that If remove the session from the url that has the report parameters, the app will redirect me to the login page, after entering the company, username and password
    it will load the report page with the data according to my filters.
    When I add the report url on the From Web option, excel does not allow me to add credentials. If I add the login+redirect url it allows me to add user/password but does not load the tables that appear on a regular browser.
    Is it possible to consume sitecatalyst without using Report Builder? If not, how you access the security info after you added the url.
    Thanks.

    To the best of my ability to tell, the right way to use this product from within Power Query would be to use its API. Unfortunately, we don't currently support either of the methods needed to be able to authenticate with the service (OAuth 2.0 and a relatively-custom
    digest-based method). Adding a mechanism to allow use of arbitrary OAuth-protected resources is a fairly high priority for us, and I hope we'll be able to deliver something before mid-2015.
    Scraping the website is very hard to do well -- both from an authentication and from a data discovery perspective.

  • How can I filter a table from Data Control without enter query

    I have a table from a web service data control based on WSDL.
    I want to filter the table without input query at filter text box. Without filter text box, each would filter the table with a hardcoded query internally.
    For example, when user click A menu button then it filters the table where type = '1' and B menu button filters the table by type='2' and C menu button filters the table by type=' ' .
    How can I filter the table without enter query?
    Could anyone point me to a solution please.
    Thanks.
    jdev 11.1.5
    Edited by: 893364 on Oct 26, 2011 12:15 PM
    Edited by: 893364 on Oct 26, 2011 12:21 PM

    Hi,
    when you created the table, did you try selecting the "filter" option. Select the table and go to the Property Inspctor. In the tool bar of the Property Inspector there is an icon to change the configuration. Its adding filter filter fields for the user to search in.
    Option 2: The data of the Web Service actually is held in the iterators. If you wanted to filter the WebService query, I would not use the WS DC but a JAX-WS proxy in a POJO to fetch the WS Data. Then have the Data Control created from the POJO. You could have a method exposed on the POJO that allows you to filter the internally held data
    Frank

  • How to enter a query into a role

    Hello Everyone,
    We are starting to look at the new analyzer.  We cannot find how to Enter a query in a role.  In the old analyzer there was a button called this.  Where is it in the new analyzer?  How to you enter and assign a query to a role?
    Thanks so much!

    Hi,
    We have a new concept of authorization where you are no more suppose to assign the query to the role from business explorer.
    I am not sure if you have gone through this but see this link a it explains about the new authorization concept that is analysys authorization.
    http://help.sap.com/saphelp_nw70/helpdata/EN/be/076f3b6c980c3be10000000a11402f/content.htm
    Now we have to create authorization object and use existing SAP autorization objects to assign authorizations...
    Also you use advanced search for searching new authorization concept in BI...this will give you plenty of links for it.
    Thanks
    Ajeet

  • How to use SQL Query in OBIEE Reports

    Hi all,
    I need to use direct sql query in report function column.. How can I implement that.
    For example
    Our report name is /shared/Automotive/Vehicle Services/Most Serviced Vehicle Models
    we have to eliminate /shared/Automotive/Vehicle Services/ part from above report name.. I have done this in sql using the Query SUBSTR(COL,INSTR(COL,'/',1,4)+1).
    So kindly help how to implement above sql query in Obiee.. Urgent.
    Thanx in advance

    796797 wrote:
    Hi all,
    I need to use direct sql query in report function column.. How can I implement that.
    For example
    Our report name is /shared/Automotive/Vehicle Services/Most Serviced Vehicle Models
    we have to eliminate /shared/Automotive/Vehicle Services/ part from above report name.. I have done this in sql using the Query SUBSTR(COL,INSTR(COL,'/',1,4)+1).
    So kindly help how to implement above sql query in Obiee.. Urgent.
    Thanx in advanceArrggh. I wish people wouldn't just answer a question without taking the time to actually think about what the user is asking for and if it makes sense. I like Diney's response best: Why not use the Title View? (i.e., asking questions until it is clear what is needed.) So along those lines, why are you trying to put the name of your report in a column of your report?? And why do you need to use direct sql to do this??
    Kindly or not, urgent or not, state what you are trying to achieve and why you need it (if the obvious answer like "using the Title View" doesn't work for you), instead of simply assuming your method is right and you need to know how to do what envision. Your method may not be correct or necessary.

Maybe you are looking for

  • Outlook and iPhone Calendar Sync Issue

    I'm having an issue where any meeting on my Outlook calendar that is after 3AM and spans multiple days (i.e meeting is from Sunday 4AM to Monday 6PM) it actually shows up on my phone as being Monday-Tuesday instead of Sunday-Monday. Has anyone else s

  • Images missing, small horizontal blue lines

    Two things have happened but I'm not sure if they are related. I am working on a Pages document where I had inserted several photos. Now the photos are missing and I notice a small blue horizontal line on the left of each blank line and new paragraph

  • PR date is after PO Date

    Hi all , System should not allow to add a PR which creation date is after PO creation date. System gives an error " PR date is after PO Date , addition not allowed " Thanks in advance

  • NullPointerException in XMLSignatureImpl if no KeyInfo provided

    Hi, The XML Signature verfication fails (NullPointerException in XMLSignatureImpl) if the ds:Signature Element contains no KeyInfo Element but a Text Node with a newline character. IMHO, this behaviour is a bug. The following XML Signature leads to a

  • WRT610N router and a WET610N wireless bridge problems

    I purchased a WRT610N router and a WET610N wireless bridge and have had a major hard time to get them to work together.  The router setup went fine.  Internet works perfectly on several machines and devices.  The bridge on the other hand has been a b