Question

I have one fancy idea to make a search through Oracle Forms within my tables. So I can do it easy with one way: user types FULL criteria value and execute it. Saying 'criteria value' I mean that user can search for example Employee within his name. What I am aiming now is when user put for example first letter 'J' in search field, i want to spread list with all employees who name started with 'J', then user can simply choose from this list and make a search.

All part of searching item by selecting from list is clear for me (which pop up when user types first letter, or not if there aren't any data which match it) but now I have a problem, how can I pass this selected input to my master-detail table and execute query which something like :

(SELECT * FROM EMPLOYEES E WHERE E.NAME= ??? ) . In '???' should be passed my parameter. How can I do it using PL/SQL?

Was it helpful?

Solution

If you have your search item named, e.g. SEARCH_NAME:

  1. Set the Default Where on te employee block to NAME LIKE :SEARCH_NAME || '%'
  2. When the user picks a value, you would have a trigger or a button they click to do a search. That trigger would have:

    GO_BLOCK('EMPLOYEE_BLOCK');
    EXECUTE_QUERY;
    
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top