4 Replies Latest reply: Dec 10, 2013 1:34 PM by steveFred RSS

    how to clear items / cache in Apex 4.2


      Can someone explain how clearing cache or session state processes are supposed to work in Apex 4.2?

      I have an application that allows the user to look up records by last name or by social security number

      A look up by SSN is one to one and takes the user to a detail page

      A look up by NAME displays a list of names where the user can select a user and display the same detail page

      The problem is that the application retains the social security number from one look up to the next. So it keeps displaying the same record

      even if you enter or select a different SSN.

      I've tried creating session state processes to either clear specific items or clear the cache on a page, but nothing seems to work.

      Maybe the problem is that I'm not understanding the options for creating these; it says things like  on load before headers, on load after headers, on submit before calculations, after calculations, etc

      The application is read only.  Logically to me, if you are linking from one page to another you need to save the value in the item  but if you are doing a  new search you need to clear it

      So I thought that on the detail page I should clear the items, or clear the cache on the page after submitting

      But can't get this to work

        • 1. Re: how to clear items / cache in Apex 4.2
          Mike Kutz

          I have an application that allows the user to look up records by last name or by social security number

          For the sake of the existence of your company and your personal freedom (ie jail time), I hope you are using VPD, ADE, Auditing, HTTPS, secure TNS, etc, etc. to follow all corporate, local, state, federal, world, and moral laws surrounding the protection of the data regarding SSN and names.


          For the search page

          Create an "on load before header  PL/SQL process"

          :Pxx_SSN := null;


          You should be able to edit the Tabs and Branches to clear out the search page also.


          Finally, if you see the SSN as a "fill in the blank option"... that could be part of the browser's preferences and its "hey, let me help you out and fill out the form with a value you entered previously" code.

          I have no idea how to set up an HTML form that tells the browser "don't even think about saving this value".



          • 2. Re: how to clear items / cache in Apex 4.2

            heres an example

            Page 1 has items P1_SSN and P1_NAME  as well as hidden items P1_TEXT and P1_TEXT2

            The button affiliated with p1_NAME takes the user to page 2 that displaces a list of match names. it has a link which goes to page 3 where P3_SSN matches #SSN#

            The button affiliated with p1_SSN takes the user directly to page 3 where p3_SSN matches #SSN#


            If I log in and search by SSN first, when I get to page 3 I have the correct record

            If I look up by name , I get the list and select a record by SSN I still have the correct record

            then I go back to Page 1 and search by SSN, entering a new SSN. I always get what ever record I previously pulled up when searching by name and selecting from the list

            On Page 1 , I have a process that says on load before regions clear items and I list all the items

            Similarly  on page 3 I have a process after submit and calculations that clears the items

            When creating these processes it asks to list the items, separated by comma. The only place to enter PL/SQL is under conditions, this is not conditional on anything, it should always clear the cache.


            I use this same logic on different pages in the same application - different tables but same flow. It works there. I don't see why it doesn't work here

            • 3. Re: how to clear items / cache in Apex 4.2
              Mike Kutz

              Are you aware of the legal ramifications of improperly storing SSN information?


              Did you try to change the Page 1 process to "on load before header" ???


              Some of the workflow sounds confusing to me.

              Please reproduce on apex.oracle.com

              Use the already existing EMP table for 'name'.

              For simplicity, just use a 4-char SSN.



              alter table emp add ( ssn varchar2(4) );


              Don't forget to create a DEVELOPER account.


              Big question : How are you protecting SSN?

              • 4. Re: how to clear items / cache in Apex 4.2

                this application will replace an application that has been in production for about 20 years using older technology. The client knows how to protect SSN information. They've been doing it for 20 years. They are an HR department, the need to be able to look up employee information.

                I'm not understanding why the workflow is confusing. It's pretty standard Apex logic. You create a report and a form.  The report brings back a list. You select an item on the list and it links to a form that displays details for that record.