4 Replies Latest reply: Jan 28, 2013 5:36 PM by Howard (... in Training) RSS

    creating a main menu with searc / look up criteria

    Nuenhundretfunfundsiebzig
      I'm using Apex 3.0 for a client
      I'm trying to create a main menu where the user can enter search criteria and when they click submit, it takes them to a different page to view the data
      The main menu needs to just show the look up criteria, not display any data

      I found documentation that shows me how to use list of values to do this where a drop down appears on the main menu, the user selects a category and then clicks on a button to take them to a separate page to display the formatted data.

      I've got this working for several look ups

      I also want to do a look up with a text field (last name) , where there is no list of values

      I found documentation ( how to create a Parameterized Report) that shows me how to do this by creating a report on the page using a query with

      WHERE
      (lower(firstname) like '%' || lower(:P1_NAME) || '%' OR
      lower(lastname) like '%' || lower(:P1_NAME) || '%')
      where P1_NAME is a text item on the region and there is also a hidden item

      The problem is that this displays the data on the same page that the report is on ( in this case the menu screen)

      How can I incorporate something like this query but have the application branch to a different page to display the results? Any documentation that does something like this? Thanks
        • 1. Re: creating a main menu with searc / look up criteria
          Mahmoud_Rabie
          Dear 975204 ,

          Would you build an example (as start point of discussion to reach solution) of your problem on apex.oracle.com
          and provide workspace/developer account

          Regards
          Mahmoud
          • 2. Re: creating a main menu with searc / look up criteria
            Nuenhundretfunfundsiebzig
            when I request a work space apex.oracle.com it gives me the latest version of Apex. This client is on Apex 3.0. But aside from that, the client is a munciple government. I cant be posting an example that displays their internal data.

            What I'm trying to do seems pretty standard design in every other programming language or tool I've used.

            Right now, when a user logs on they have several options for searching for records; by last name, by department, by agency
            Department and agency searches are by drop down lists. Last name is by entering text.

            I have all of these working.

            For a search from a drop down list, I have a main menu, the user selects an item from the list and it displays results on a new page
            For a search by name, it display data on the same main menu page. I cant get it to open a new page

            If if put all the look items on the first page, I am able to combine search options ( ie search by last name in a given department)


            Ideally I like to have all search results open in a new page

            thanks
            • 3. Re: creating a main menu with searc / look up criteria
              Nuenhundretfunfundsiebzig
              on a related question, is there a way to reset the position on a drop down?
              when I first login to the app, the cursor points to the first option on the drop down which is no option selected.
              If a user selects some criteria , does a search, and then goes back to the search page, the cursor is no position on the item they previously searched on, not the no option selected option
              • 4. Re: creating a main menu with searc / look up criteria
                Howard (... in Training)
                RE: APEX 4.x vs. 3.0.

                Just do the best you can. Try to use only 3.0 features when you do an example. I fully understand that you can't use real data -- or anything real -- menu selection, categories, etc., etc. Just make up something descriptive.

                Yes, you can give a select list a value in the header before the region displays if you don't want it to default to "start over".

                Some sample code where -- in the ELSE -- I set the value of the select list variable so that's the value it displays. In the THEN, I save the current value into a global (Application) item.
                Begin
                  IF (:F217_PAGE_NAME_FLAG = 'Month') THEN
                    SELECT :P3_SL_SYS_NIC_NM INTO :F217_SYS_NIC_NM FROM DUAL;
                  ELSE
                    SELECT :F217_SYS_NIC_NM INTO :P3_SL_SYS_NIC_NM FROM DUAL;
                    SELECT 'Month' INTO :F217_PAGE_NAME_FLAG FROM DUAL;
                  END IF;
                End;
                Howard