0
votes

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?

1
It's not clear what your set up is. Does the user enter the search string in a text field, or are they picking a letter from a list item? - Jeffrey Kemp
I mention that User types a letter (from keyboard). He can write whole words, but for convenience, i want to show a list within his string - user3252538
Yes, that works with both text items and list items. - Jeffrey Kemp
But how to pass my input into master-detail? Let's say i want to populate it using master-detail - user3252538

1 Answers

3
votes

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;