Connect all the elements of session state?

I need to create a record of routine that captures the current user to an APEX session state and she pours in a table of error log.

I already have the paper table and an autonomous_transaction function defined in one of my pl/sql packages, but now I need to get information from the user's session, for example what page they were, what their item app values were, what the last request has been, etc..

Does anyone know how to do that without grant select on apex_030200.wwv_flow_data the ID of the workspace where the logging feature?

Wwv_flow_data contains information for all users, I want just the logarithmic function to access the current user/app/session data only. Yes, I can filter with a where clause clause, but I rather it would be more like a self filtering view that shows you your own data (defined in the schema of the apex/flow). Even better would be a function APEX_UTIL that returns the session state in a clob or varchar2 32K maybe even in the name = value format.

My version of db is a business with Apex 3.2.0.00.27 11.1.

You'll want to use the built-in views. Here is a sample of something that I use to record values report.

DECLARE
CURSOR c_items IS
      SELECT item_name
        FROM apex_application_page_items
       WHERE application_id = p_application_id AND
             page_id = p_page_num AND
             (region_id = p_region_id OR
              p_region_id IS NULL) AND
             display_as NOT IN ('Stop and Start HTML Table (Displays label only)', 'Hidden and Protected');

  BEGIN
    FOR r_items IN c_items LOOP
      store_report_value(p_report_id, r_items.item_name, v(r_items.item_name));
    END LOOP;

  END;   

You can pass the values of Apex as: APP_SESSION,: APP_PAGE_ID,: APP_USER as parameters in a procedure.

Tags: Database

Similar Questions

  • Select all the elements in VARRAY

    I am being selected in a table where all IDS are in a VARRAY I populated. I searched online and on the forums and cannot find an answer. Help is greatly appreciated.

    E.G.

    SELECT ID in BULK COLLECT INTO p_ID_1 FROM tbl_name WHERE contained_by = p_ID;
    v_id_1: = v_id_1();

    I'm IN p_id_1.first... p_id_1.Last LOOP
    v_id_1.extend ();
    v_id_1 (v_id_1.Last): = p_id_1 (i);
    END LOOP;

    -so far, my VARRAY is filled very well here's where I have a problem:

    SELECT the BULK COLLECT INTO p_id_2 FROM table_name_2 WHERE contained_by IN v_naid_1 ID (1);

    Everything works fine when I run the query. The problem is I want the query to select where the contained_by (all ELEMENTS in varray). Not only the first. How can I do this? I do "FIRST" thought "FINALLY" somehow? I can't list all the elements because there may be thousands.

    Thank you!

    jihuyao wrote:

    (not tested)

    And will not pass the test. First number uses the COUNT method in SQL:

    SQL> declare
      2      v_deptno sys.OdciNumberList := sys.OdciNumberList(10,20);
      3      v_empno sys.OdciNumberList;
      4  begin
      5      select empno
      6        bulk collect
      7        into v_empno
      8        from emp
      9        where deptno in (select v_deptno(level) from dual connect by level < v_deptno.count);
     10      for i in 1..v_empno.count loop
     11        dbms_output.put_line(v_empno(i));
     12      end loop;
     13  end;
     14  /
          where deptno in (select v_deptno(level) from dual connect by level < v_deptno.count);
                                                                               *
    ERROR at line 9:
    ORA-06550: line 9, column 76:
    PL/SQL: ORA-00904: "V_DEPTNO"."COUNT": invalid identifier
    ORA-06550: line 5, column 5:
    PL/SQL: SQL Statement ignored
    

    This one is easy to fix. But while you'll get:

    SQL> declare
      2      v_deptno sys.OdciNumberList := sys.OdciNumberList(10,20);
      3      v_empno sys.OdciNumberList;
      4      v_cnt number;
      5  begin
      6      v_cnt := v_deptno.count;
      7      select empno
      8        bulk collect
      9        into v_empno
     10        from emp
     11        where deptno in (select v_deptno(level) from dual connect by level < v_cnt);
     12      for i in 1..v_empno.count loop
     13        dbms_output.put_line(v_empno(i));
     14      end loop;
     15  end;
     16  /
    declare
    *
    ERROR at line 1:
    ORA-06532: Subscript outside of limit
    ORA-06512: at line 7
    

    Why? The binding occurs before execution. Mandatory if v_deptno (level) will try to assess the level BEFORE the time of execution and therefore level is not set. Currently (this may change in the next version) before executing Oracle treats level 0, then you could try level + 1. This will not throw an error, but you will get incorrect results:

    SQL> declare
      2      v_deptno sys.OdciNumberList := sys.OdciNumberList(10,20);
      3      v_empno sys.OdciNumberList;
      4      v_cnt number;
      5  begin
      6      v_cnt := v_deptno.count;
      7      select empno
      8        bulk collect
      9        into v_empno
     10        from emp
     11        where deptno in (select v_deptno(level + 1) from dual connect by level < v_cnt);
     12      for i in 1..v_empno.count loop
     13        dbms_output.put_line(v_empno(i));
     14      end loop;
     15  end;
     16  /
    7782
    7839
    7934
    
    PL/SQL procedure successfully completed.
    
    SQL> 
    

    As you can see everything we returned is deptno = 10 employees. Why? Because it does not an affair occurs just before the execution, but is also a TIME. That is why the subquery:

    Select v_deptno from dual connect by level (level + 1)<>

    produces two rows with the same value of v_deptno (0 + 1).

    Hope you got the image.

    SY.

  • How to know all the elements in a block

    Hello everyone.

    Im working with forms and the States 10 G.

    One quick question.

    I need to know all the elements in a block.

    I know with the get_block_property premier_enregistrement and Last_record I know the first and the last point in a record, but
    How do I know all the others?

    Thanks in advance and greetings to all.
    Happy Cristmast

    You can the fisrt element in a block using GET_BLOCK_PROPERTY ('BLOCKNAME', FIRST_ITEM);
    then the loop above the element

    LOOP
      vcItem:=GET_ITEM_PROPERTY(vcItem, NEXTITEM);
      EXIT WHEN vcItem IS NULL;
    END LOOP;
    
  • Satellite C55-A-1HN loses its Wi - Fi connection all the time

    Hello

    I hope someone can help me because this problem starts to become very frustrating!

    Laptop loses the wifi connection all the time, where as other devices (Ipad, mobile phones, other portable) all have a strong Wifi connection. My network adapter is Atheros AR956x, I tried to date but does not seem to make a difference, unckecking I tried the properties box that says off adapter to save energy, I thought that had fixed, but unfortunately still the same problem.

    Thank you

    Paul

    Hi Paul

    Is there a difference when using the laptop with the battery or the power supply?

  • Is there an easy way to view all the elements of the façade which are hidden in a pragmatic way?

    Hello

    There were some cases where the new indicator that I created was actually overlaps the other indicator which was hidden at the time of development.

    I knew only when the program is operating normally and the hidden indicator will appear on the front panel.

    It would be great if I can see all the elements of hidden façade while in development mode.

    Is there an easy way to do this or am I missing something?

    Thank you.

    Steve

    See here: http://forums.ni.com/t5/LabVIEW/Darren-s-Weekly-Nugget-08-14-2006/m-p/403788

    You can also choose to vote in favour of this idea: http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Show-all-hidden-controls-and-indicators/idi-p/1113431

  • Adding timestamp with all the elements of a 2D array

    Hello

    I want to add a stamp in real time with all the elements of a 2d array before writing on a worksheet. My 2d array consists of amplitude and frequency.

    kindly guide me how to do this.

    Best regards

    RASHID

    That it should be now.

    Kind regards

    Kevin

  • Why all the elements of the array does not appear?

    Hello

    I'm learning about the handling of tables.  The example finder includes this one, 'build array_forum.vi', which shows the two modes, concatenate and adding, I understand, HOWEVER, I can't understand how they built this vi.  For example, I can find the Array function to build, but I do not understand how they created the "digital data table 1" "data table 2" digital... etc, and I can't find the functions on the pallets that cause display "build the CONCATENATE entries table". ".  Where are these blue functions?

    Where these functions are found in the palette, and how we build them like that?

    The other vi indicated here, 'for loop array_forum.vi' is my attempt to reproduce, but it doesn't show all the elements of the array; However, it only displays a SINGLE element, the last element of the array.  How can I view all the items in the table I am creating using the FOR LOOP?  I am doing something wrong with the LOOP FOR?

    Thank you

    Dave

    Right-click your scoreboard, uncheck the "Display as icon" and see what happens.  There are two ways of viewing terminals, most of us like the simple point of view, the default value is the display of the icon.

  • Adding timestamp with all the elements of a table 1 d

    Hello

    I want to add a stamp in real time with all the elements of a 1 d array before writing on a worksheet.

    kindly guide me how to do this.

    Best regards

    RASHID

    Hi rachid,.

    Whence this table? Is a device for the acquisition of data AND measurement data?

    If yes you can just change the type of waveform data, where a timestamp is included.

    However, you can also create a waveform on your table 1 d using construction wavefrom, as here:

    Christian

  • How can I view all the elements of an array?

    Hello

    I'm learning about the handling of tables.  The example finder includes this one, 'build array_forum.vi', which shows the two modes, concatenate and adding, I understand, HOWEVER, I can't understand how they built this vi.  For example, I can find the Array function to build, but I do not understand how they created the "digital data table 1" "data table 2" digital... etc, and I can't find the functions on the pallets that cause display "build the CONCATENATE entries table". ".  Where are these blue functions?

    Where these functions are found in the palette, and how we build them like that?

    The other vi indicated here, 'for loop array_forum.vi' is my attempt to reproduce, but it doesn't show all the elements of the array; However, it only displays a SINGLE element, the last element of the array.  How can I view all the items in the table I am creating using the FOR LOOP?

    Thank you

    Dave

    I think I posted this in the wrong place.  I reposted it on the forum of Labview.

    Dave

  • Can I have the HP Portable hard Drive 500 GB connected all the time to the laptop?

    Hello. I bought a HP Portable hard Drive 500 GB with USB 2.0 to 3.0 running on Windows XP in a Toshiba Satellite laptop since 2003. I had a few problems, probably due to the low speed of my USB port, but now it seems OK, as I moved it to a different USB port according to the instructions for help. My question is if the hard drive has been designed to be connected all the time or if I have to disconnect me and just use it whenever I have store information. Thank you

    Hello

    I connect 3 of them to one of my laptops all the time. I actually use a (7 ports) USB hub

    Concerning

  • All the elements menu of AE are low and I can't create a new project.

    The project window is supposed to be some upward when I start AE, but it's not. All the elements menu of AE are low and I can't create a new project. I am a new user of AE and confused. Can you help me? Thank you!

    You launched the render node and not the full version of the software.

  • Get all the elements of a spread

    Hi all

    How to get all the elements (images, etc.) of the current spread?

    I know we can get the items on a page by < ISpread > GetItemsOnPage(), but how to get ALL the items (including who are located outside of the page but on the spread)

    Thank you

    Hello Shawn,

    You can browse all the pages on the spread and call GetItemsOnPage with the parameter bIncludePasteboard = kTrue.

    Markus

  • To find the value of a dynamic element to session state,

    Hi all

    Is it possible to find the value of an item in the session state, but the name of the element is stored in a variable
    as

    APEX_UTIL. GET_SESSION_STATE (v_variable)

    where v_variable would be the name of the element?

    Thanks in advance,
    RD

    You describe the default feature?
    http://docs.Oracle.com/CD/E23903_01/doc/doc.41/e21676/apex_util.htm#CHDEJEJE

    DECLARE
      v_variable  VARCHAR2(20) := 'P1_ITEM';
      v_value     VARCHAR2(255);
    BEGIN
      v_value := APEX_UTIL.GET_SESSION_STATE (p_item => v_variable);
    END;
    

    I missed something?

  • APEX Session point of the Application or the item of Session State set and get?

    I need assistance with items and values in a single Application-Apex:

    I have a List-Item (P101_UMGEBUNG) selected on the page of connection (Page 101) in my application (next to username and password).

    After this item has been selected in the list of outfits and the "Login" button pressed, I want to use this value of the element in the context of different select statements on other pages for example in reports to the 4 Page, like this:

    "select * from mytable where environment =: P101_UMGEBUNG;

    The select statement is faulty, it dosent go back any line. It turns out that the value I just chose in the list is not saved in session state, so of course the select statement fails.  I determine this by clicking on the session menu item in the developer bar - the item itself presents itself, but the value of the element is empty:

    Unbenannt.png

    Which would cause a selected list value not end upward in session state and how to make sure he gets there?

    I've tried different solutions (process of pl/sql, javascript actions dynamics and brances) I found here in further discussions and with google, but maybe im wrong,

    Someone has a solution for this problem and could explain it in detail?

    Hello

    Value of the item on your login page is disabled by the process of "Empty the Cache page (s)". To save the State of this element, you can:

    1. remove the "Empty the Cache" page (s) process or set the condition to "never". It security hole.

    2 create the point on another page (for example, on page 10 P10_UMGEBUNG) and create processes on the login page BEFORE the process of "Empty the Cache" page (s), which will be

    Save the State of P10_UMGEBUNG. Make the process of PL/SQL:

    BEGIN
      APEX_UTIL.SET_SESSION_STATE('P10_UMGEBUNG', :P101_UMGEBUNG);
    END;
    

    After that, you can use the value of the P10_UMGEBUNG element:

    select * from mytable where environment =:P10_UMGEBUNG;
    
  • What the Protection of Session State and when it is used.

    Hello

    I just want to know what is the Protection of the State of Session and where it should be used.

    Thank you
    Deepak

    Deepak,

    Protection of the State of session in the Oracle apex is a built-in feature that allows you to prevent users / hackers to a URL handling in your application.

    http://download.Oracle.com/docs/CD/E14373_01/AppDev.32/e11838/sec.htm#CDDGIGJH

    A simple way to undersatnd, what would be your banking session. As soon as you connect, your URL would include a key and probably session information for the session that you log on. But if you copy this URL and log off and reuse the URL, you wouldn't be able to connect as that the session is over.

    Or once you connect and navigate to a page, you would have the information information session and the page in your browser to the URL (say it's balance transfer page). However, this page would not directly accessible using the URL with someone else. A similar security feature can be activated by using "URL access" in the access page for Apex session state protection.

    Hope this helps,
    Rajesh.

Maybe you are looking for