This discussion is archived
14 Replies Latest reply: May 19, 2013 12:03 AM by Mini RSS

Search through Enter

Mini Journeyer
Currently Being Moderated
Hi friends,

I have a text field page item "Emp No" with a button "Find" in a page 10.

Soon after i enter any "Emp No" in the field and if i press "Find" button means, it will redirect to the another page 7, carrying the
Empno that i have entered in the field in page 10 through URL and it will set that value to one hidden item P7_X which is in the page 7
and im using that hidden item to query data's in the page 7.

I need that search action to be done, not only by pressing the "Find" button but also pressing enter(soon after i entered a value in the "Emp No" field).

Whether is it possible to perform that action once i press the enter button in keyboard.

Thanks in advance.

Brgds,
Mini
  • 1. Re: Search through Enter
    Iris 314 Newbie
    Currently Being Moderated
    Hi, Mini.

    What are you using to redirect the page to page 7?
  • 2. Re: Search through Enter
    fac586 Guru
    Currently Being Moderated
    Mini wrote:

    I have a text field page item "Emp No" with a button "Find" in a page 10.

    Soon after i enter any "Emp No" in the field and if i press "Find" button means, it will redirect to the another page 7, carrying the
    Empno that i have entered in the field in page 10 through URL and it will set that value to one hidden item P7_X which is in the page 7
    and im using that hidden item to query data's in the page 7.

    I need that search action to be done, not only by pressing the "Find" button but also pressing enter(soon after i entered a value in the "Emp No" field).

    Whether is it possible to perform that action once i press the enter button in keyboard.
    Set the Submit when Enter pressed property of the "Emp No" item to Yes. This will submit the page when enter is pressed in the item. The <tt>REQUEST</tt> built-in substitution string will be set to the name of the item. The <tt>REQUEST</tt> value can be used to control conditional branching to page 7.
  • 3. Re: Search through Enter
    Mini Journeyer
    Currently Being Moderated
    Hi fac,

    Thanks for the reply.

    i have set like Submit when Enter pressed to yes for that text field.

    Since im using a branch After page processing for redirecting to the page 7, from page 10 and that branch will set this item P7_X1 with these values &P10_EMPLOYEE_ID. Once the find button is pressed, but how i can make to redirect the page once the enter is pressed after entering the employee number in the text field.

    Currently soon after i set "submit when enter pressed property" to that text field item it is submitting the page, but not using the branch that i have created in that page inorder to redirect to the page 7 with the values that i have entered in that field.

    Thanks

    Brgds,
    Mini
  • 4. Re: Search through Enter
    fac586 Guru
    Currently Being Moderated
    Mini wrote:
    i have set like Submit when Enter pressed to yes for that text field.
    Since im using a branch After page processing for redirecting to the page 7, from page 10 and that branch will set this item P7_X1 with these values &P10_EMPLOYEE_ID. Once the find button is pressed, but how i can make to redirect the page once the enter is pressed after entering the employee number in the text field.

    Currently soon after i set "submit when enter pressed property" to that text field item it is submitting the page, but not using the branch that i have created in that page inorder to redirect to the page 7 with the values that i have entered in that field.
    What is the condition on the branch?
  • 5. Re: Search through Enter
    Mini Journeyer
    Currently Being Moderated
    Hi fac,

    I have a branch with
    Type: Branch to Page or URL
    Branch Point : On Submit: After Processing(After Computation, Validation and processing)
    Target Type: Page in this application
    Page:7
    Set these items:P7_X1
    With these values:&P10_EMPLOYEE_ID.
    when Button pressed: Find
    The above branch redirects to a page 7, by taking a value from page 10 to page 7. I need to the above branch to process if i pressed "Enter" too fac.

    Thanks

    Brgds,
    Mini
  • 6. Re: Search through Enter
    fac586 Guru
    Currently Being Moderated
    Mini wrote:
    Hi fac,

    I have a branch with
    Type: Branch to Page or URL
    Branch Point : On Submit: After Processing(After Computation, Validation and processing)
    Target Type: Page in this application
    Page:7
    Set these items:P7_X1
    With these values:&P10_EMPLOYEE_ID.
    when Button pressed: Find
    The above branch redirects to a page 7, by taking a value from page 10 to page 7. I need to the above branch to process if i pressed "Enter" too fac.
    Remove the When Button Pressed condition from the branch and replace it with a Request is contained within Expression 1 condition:
    FIND,P10_EMPLOYEE_ID
    (Assuming the name of the Find button is "FIND" and the name of the text item is "P10_EMPLOYEE_ID".)
  • 7. Re: Search through Enter
    Mini Journeyer
    Currently Being Moderated
    Dear fac,

    Your Solution is Excellent, I checked with my sample data in apex.oracle.com it worked perfectly. But i dint get time to check with my real data.

    Will check with the real data and close this thread by tomorrow.

    Thanks for your timely response
    :D

    Brgds,
    Mini
  • 8. Re: Search through Enter
    Mini Journeyer
    Currently Being Moderated
    Hi fac,

    While checking with the real data i faced some issues like

    Actually in the page 10 i have two search fields

    <li>Employee_ID-->text field-->Find button
    <li>Name-->select list(with display value as empname and return value as person id)--->find1 button

    Also i have two different find buttons for both the search fields like "Find" for Employee_ID and "Find1" for Name.

    I have two branches for both the buttons like for Employee_ID i have the following branch with the conditions
    Type: Branch to Page or URL
    Branch Point : On Submit: After Processing(After Computation, Validation and processing)
    Target Type: Page in this application
    Page:7
    Set these items:P7_X1
    With these values:&P10_X2.
    when Button pressed: Find
    Another branch for the Name lov field like
    Type: Branch to Page or URL
    Branch Point : On Submit: After Processing(After Computation, Validation and processing)
    Target Type: Page in this application
    Page:7
    Set these items:P7_X1
    With these values:&P10_NAME.
    when Button pressed: Find1
    If i changed the branch condition like you said
    Request is contained within Expression 1 condition:
    FIND,P10_EMPLOYEE_ID
    It is redirecting to the page 7, but the value is not passing to the page 7 and it is not querying in that page. Currently im passing the value that was typed in the text field Employee_id to the hidden page item P10_X2 and im using that item P10_X2 which is in page 10 to the page 7 item P7_X1.

    Soon after applying the condition like request is contained within expression 1 and given like FIND, P10_EMPLOYEE_ID means for the first branching condition, the second branching condition of the name lov field is not working.

    Is im missing anything in the steps.

    Thanks

    Brgds,
    Mini
  • 9. Re: Search through Enter
    fac586 Guru
    Currently Being Moderated
    Mini wrote:

    If i changed the branch condition like you said
    Request is contained within Expression 1 condition:
    FIND,P10_EMPLOYEE_ID
    It is redirecting to the page 7, but the value is not passing to the page 7 and it is not querying in that page. Currently im passing the value that was typed in the text field Employee_id to the hidden page item P10_X2 and im using that item P10_X2 which is in page 10 to the page 7 item P7_X1.
    Is the hidden page item P10_X2 necessary? It appears to be superfluous. How is the value set?
    Soon after applying the condition like request is contained within expression 1 and given like FIND, P10_EMPLOYEE_ID means for the first branching condition, the second branching condition of the name lov field is not working.
    Use Debug mode to determine what is occurring during branch processing.
  • 10. Re: Search through Enter
    Mini Journeyer
    Currently Being Moderated
    Hi fac,

    Thanks for the reply.
    Is the hidden page item P10_X2 necessary? It appears to be superfluous. How is the value set?
    Yes i need that hidden page item P10_X2 in which ill get the corresponding person_id from the employee_number that im entering in the search text field. Because ill be passing the person_id to the next page 7 inorder to query the required information according to the person_id which is in page 10.

    Im getting the person_id in that item in runtime through DA.

    I have reproduced the same example in apex.oracle.com FYR

    Under application 1576 in page 1 i have a field employee id and department name, in which ill get the required dept id in the field P1_X according to the employee id that I enter in runtime in that field using DA and i have a branch in that page which takes the deptid from page 1 to page 2 and queries the location of that deptid accordingly in the page 2.

    Same way my another search for the deptname also works with an another branching condition in page 1 and it passes the deptno as a return value from that select list and it will pass to the page 2 and it is querying the location.

    My requirement like i said, i need to query also through the enter button like soon after i enter the emp no in the text field and pressed enter then the dept no which will be in P1_X due to DA, need to pass to the next page 2 to query the location.

    Thanks

    Brgds,
    Mini
  • 11. Re: Search through Enter
    fac586 Guru
    Currently Being Moderated
    Mini wrote:
    Hi fac,

    Thanks for the reply.
    Is the hidden page item P10_X2 necessary? It appears to be superfluous. How is the value set?
    Yes i need that hidden page item P10_X2 in which ill get the corresponding person_id from the employee_number that im entering in the search text field. Because ill be passing the person_id to the next page 7 inorder to query the required information according to the person_id which is in page 10.

    Im getting the person_id in that item in runtime through DA.
    The On Change DA is overridden by the page submit, so P10_X2 is never set. Why are you using a DA?

    Set P10_PERSON_ID using a Post-Submit SQL Query (return single value) computation.
  • 12. Re: Search through Enter
    Mini Journeyer
    Currently Being Moderated
    Hi fac,

    Thanks for the reply.
    Why are you using a DA?
    Inorder to set value for the page item P1_X i used DA. Now this DA is not needed as this can be achievable through the computation that you have used.

    In the apex.oracle.com it worked perfect. But i dont know why the same is not working with my real time data.

    Search by employee_id through find and enter button is working perfectly with my real data. But my second search which consist of employee name as a lov is not working. If i clicked the find1 button for the lov soon after i selected a name means, that second branching is not working and it is not passing the corresponding person id from that lov name to the next page to query.

    But if i removed the condition in the first branch like Request contained within Expression 1 with FIND, P1_EMPLOYEE_ID and instead of that if i referred a button for that branch 1 and if i test with the lov search means it is working fine and it is passing the person id to the next page.

    But i dont know why the expression condition that i added for the employee id text field for the first branching condition affecting the second branching condition which is for my employee name lov and causing it to not to work. But removing the condition in the branch 1 means, then the branch 2 is working for the lov field search.

    This second branching condition is getting weird.

    Is im missing anything.

    Thanks

    Brgds,
    Mini
  • 13. Re: Search through Enter
    fac586 Guru
    Currently Being Moderated
    Use Debug mode to determine what is occurring during branch processing.
  • 14. Re: Search through Enter
    Mini Journeyer
    Currently Being Moderated
    Hi fac,

    Finally, it worked for me. I dont know what went wrong.

    What i have done is i moved the second branch condition ahead of the first branch condition and i tried. Now it is working in a way like it is searching for both enter and submit button.

    Thanks for your kind reply in helping me to solve this issue.
    :D

    Brgds,
    Hari

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points