WIN_API_ENVIRONMENT equivalent in APEX

Is there an equivalent to the forms win_api_environment.get_windows_username
I am looking to update a field with the users windows login.
Thanks
Fiona

Hello Fiona,
I'm not familiar with Forms, but if you referring to the user name running the application, you can use the built-in substitution string APP_USER (page 4-21 on the user's manual). If you want to save the user id you can follow this thread Problem with "On New Instance" computation point
Hope this can help,
Arie.

Similar Messages

  • APEX equivalent of Java Static Initialization Block

    Is there a APEX equivalent of Java static init block (i.e. execute once at class load time)? My use case is that I need to load some configuration values to an environment (i.e. APEX Workspace) specific variables and don't want to do per user session since the values remain the same for all user sessions. I believe SYS_CONTEXT is tied to user session and would not be useful for my usecase. Any advise would be appreciated.

    Hello,
    You should check the concept of User Preferences and see if it can help you:
    http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21678/aadm_mg_sessions.htm#BABHFEFD
    Regards,
    Arie.
    ♦ Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.
    ♦ Author of Oracle Application Express 3.2 – The Essentials and More

  • APEX listener returns blank login page

    APEX 4.2.2
    APEX listener 2.0.2
    Glassfish 3.1.2.2
    Platform is 32bit Linux, Amazon EC2
    I am reasonably certain that I have deployed apex.war and i.war correctly to Glassfish, and defined a virtual path and a database connection correctly.
    When running Firefox on the EC2 machine, browsing to
    http://localhost:8080/apex/dad1/
    returns a login page no problem. But browsing to the external, publicly visible, address (I have to obscure the actual address, I'll use a.b.c.d) either from the hosting machine or across the net returns an empty page:
    http://a.b.c.d:8080/apex/dad1/
    This succeeds:
    http://a.b.c.d:8080
    I get the standard Glassfish page so I know Glassfish is listening on that address.
    I have also tried starting the listener standalone, and I get the same effect: it returns a login screen when browsing to the localhost, but going to the external address I get a blank page.
    The pages really are blank, nothing shows in the page source and this is all Firebug returns:
    <html>
    <head> 
    <link title="Wrap Long Lines" href="resource://gre-resources/plaintext.css" type="text/css" rel="alternate stylesheet"> 
    </head>
    <body> 
    <pre></pre> 
    </body>
    </html>
    I have been trying to enable tracing of the request on the server side, but I haven't yet found a way to produce the equivalent of an access.log. Searching the forum did produce a couple of references to "routing rules" but I have been unable to find what and where these might be.
    As the listener works perfectly when going to localhost, I cannot believe that rthis is the common problem of not finding imges, or an issue with url mapping. But I am of course open to any suggestions!
    Any insight will be welcome.
    Thank you for your time.

    Fixed. Finally tracked it down, a redirection problem fixed with patch 16760897.
    Thank you to anyone who looked at this, sorry to have wasted your time, hope posting the solution will assist someone else.

  • APEX 4.1.1 Memory Leak in IE7

    Hi,
    We busy upgrading our apex and db from 3.0/10G to 4.1.1/11.2G and notice that there appears to be a memory leak when using APEX. At one stage we have had IE7 using over a gig of memory.
    When you load or refresh your page IE7 seems to grab on average 2-5MB of memory for each page load. At first we thought it may have been our apps or setup but this also happens when we go to app 4550 page 1 on apex.oracle.com.
    How to replicate:
    Open task manager to view the Memory Usage.
    Using IE7
    1. Go to http://apex.oracle.com/pls/apex/f?p=4550:1
    2. Go back to Task Manager and note the readings once the CPU Usage for iexplore.exe has stablised to 0.
    3. go back to IE7 and press F5
    4. Repeat steps 2-3 and you will see the Memory usage increases.
    We think this maybe due to a few jQuery UI memory leaks within IE7 and thought this bug ticket maybe of interest http://bugs.jqueryui.com/ticket/7666 (Slightly different versions but similiar experiences)
    Could someone else confirm that they also experience the increasing or have had similiar problems and managed to resolve it?
    TBH, it wouldn't be an issue to use another browser like Firefox to access the builder but this also affects the applications if they include APEX standard Javascript and CSS.
    Thanking you in advance.
    Alistair
    Edited by: Alistair Laing on Jun 16, 2012 2:32 PM
    Added Tags

    Alistair Laing wrote:
    Hi,
    We busy upgrading our apex and db from 3.0/10G to 4.1.1/11.2G and notice that there appears to be a memory leak when using APEX. At one stage we have had IE7 using over a gig of memory.
    When you load or refresh your page IE7 seems to grab on average 2-5MB of memory for each page load. At first we thought it may have been our apps or setup but this also happens when we go to app 4550 page 1 on apex.oracle.com.
    How to replicate:
    Open task manager to view the Memory Usage.
    Using IE7
    1. Go to http://apex.oracle.com/pls/apex/f?p=4550:1
    2. Go back to Task Manager and note the readings once the CPU Usage for iexplore.exe has stablised to 0.
    3. go back to IE7 and press F5
    4. Repeat steps 2-3 and you will see the Memory usage increases.
    We think this maybe due to a few jQuery UI memory leaks within IE7 and thought this bug ticket maybe of interest http://bugs.jqueryui.com/ticket/7666 (Slightly different versions but similiar experiences)
    Could someone else confirm that they also experience the increasing or have had similiar problems and managed to resolve it?Anecdotally, yes. Don't have exact steps for replication or precise numbers, but I have noticed this in passing. On the junk that my client considers a PC suitable for web development the typical IE7 memory footprint with the APEX 3.0 builder and several other tabs running is about 52MB. Add APEX 4.1.1 and it climbs constantly until I have to pull the plug when it gets north of 150MB as the PC can't take it.
    As well that I also have Firefox and 4.1.1 is still experimental at that site...
    At the moment I don't have to resolve it and if I did the only option I'd propose is the replacement of IE7.
    VC wrote:
    Look at this http://www.bbc.co.uk/news/technology-18440979
    Alistair Laing wrote:lol @ VC - I dont shop online at work :-D
    I saw that eariler this week. I do agree with the concept though.So take appropriate action: charge extra for IE7 support.
    The amount of work and effort involved in making our website look normal on IE7 equalled the combined time of designing for Chrome, Safari and Firefox.Is entirely accurate. If it's stated as a requirement, itemise it as an extra on the quote.
    Educate management and bean counters: show them the one line of standards-compliant CSS that's all that is necessary in Safari, Chrome, Firefox and Opera (and just possibly in IE8/9/10), how it isn't supported in IE7, and the tortuous hacks and workarounds that are required to get something equivalent working there.

  • Apex Version 4.2: Why doesn't the session timeout parameter settings work?

    Prior to an upgrade to Apex Version 4.2.0.00.27, we ran Apex Version 4.1 in our environment. This is on a platform using Oracle Database Enterprise Edition 11g R2 on Windows Server 2008. The session timeout parameters (set for a single application using "Shared Components" -> "Security Attributes") were set to the following:
    Maximum Session Time: 1 day
    Maximum Session Idle Time: 8 hours
    This worked with no problems in Apex 4.1; our user would leave a data entry form open for several hours, complete the data entry then submit the page. Now, with the upgrade to Apex 4.2, doing the same thing causes the system to redirect to the login page and aborting any edits or new data entered into the form previously.
    I have tried to set both session parameters to ZERO (0) which is what the documentation explains is the equivallent to "no timeout" but that didn't work as well.
    I have reset the session control parameters to what they were before the upgrade and my session times out before the time values I set. (on the version 4.2 upgraded instance).
    Why was the session timeout parameters I set ignored by the system? Can anyone else out there confirm/repeat the problem I observed?

    Hi Richard,
    You probable have it ok, but the time should be in seconds.
    Kees

  • How to change report query dynamically in Oracle APEX?

    Hi,
    I want to dynamically change the where condition in APEX report query. Can anyone help me solve my this problem?
    (Just want to change the query which we change in Oracle Reports using lexical parameter to change &Where, &Order by etc. dynamically!!)
    Thanks, Praful

    Hi
    I've been using flexible queries in APEX for a few years now, and your question just added a whole new dimension to the flexible and powerful nature or writing reports in APEX.
    While APEX Interactive reporting has almost completely removed the need the equivalent of Lexicals in Oracle Reports, I thought it might be fun to try and use lexicals in an APEX report.
    Before we start I should summarise the powerful capability of APEX reporting to have oprtional parameters (lots and lots of them if this is needed).
    For each parameter, you simply add a page item which will hold the value of the parameter.
    The item/parameter can be populated by typing in the value, defining an LOV, using a date-picker etc.
    To make the parameter optional simply use an OR in the where clause.
    So for a apge item P200_PARAM1.....include
    WHERE (:P200_PARAM1 IS NULL
    OR COLUMN1 = :P200_PARAM1)
    This way you can either leave the page item null or type in / select a value from a LOV.
    There is a small quirk in APEX LOV's which sometimes returns a value of '%' or '%null%' - depending on the version - when no value is selected.
    See Patrick Wolf's solution for this at Re: Null value handling in LOVs
    I include this Application Process in all my APEX applications ;)
    Now let's look at using the equivalent of Oracle Reports Lexicals......
    First-off - this is based on the APEX SQL report - NOT Interactive Report.
    It relies on the fact that you can let the query be parsed only at runtime.
    1. Define an SQL report entering the 'core' of your query.
    With a query like SELECT ENAME, JOB FROM EMP
    Select 'Generic Columns' option in the 'Column Headings' section
    Finish the report creation
    2. Define a page item - say P200_LEXICAL - type text on the page
    3. Edit the report and update the SQL query to include your lexical page item
    SELECT ENAME, JOB FROM EMP &P200_LEXICAL. (REMEMBER THE '.' AT THE END)
    Ensure that the option "Use Generic Column Names (parse query at runtime only)" is selected at the bottom of the query
    4. Add a button to the page -using 'Create a button displayed among this region's items' the will submit the page.
    5. Run the page - you will see all the employee names and job desdriptions
    6. Enter a where clause into the 'Lexical' textbox - say "WHERE ENAME LIKE 'K%'" and click the 'Go' button
    Voila! your where clause is magically applied.
    Try any variant you like adding an ORDER BY clause etc...... this is FUN!
    7. Clear the value of the LEXICAL and click go.
    Edit the report and move the &P200_LEXICAL. into the selected columns (or add another one)
    SELECT ENAME, JOB &P200_LEXICAL. FROM EMP
    8. Run the page
    Enter ",SAL" in the textbox and "Go"
    We can add as many columns as we like (subject to the "Maximum number of generic report columns:" set below the SQL query in the report edit section)
    Now because we have all the flexibility in APEX of setting page items using SQL or PLSQL you can set the value of the lexical programatically, or just pre-set a few values in an LOV - the options are limitless.
    While I've never had the need to use lexicals - you can see that APEX provides the most Flexible Lexicals in town.
    Eat your heart out "Oracle Reports"!!!
    Have fun
    Mike

  • Issues in integrating 10.1.3 Application server with APEX

    Hi
    I want my apex applications to work both using 9iAS and 10gas (10.1.3). There is a requirement for this. So I am using this document
    http://download.oracle.com/docs/cd/E14373_01/install.32/e13366/otn_install.htm#CHDFJBFB
    section 3.4.5.4
    In 9iAS we used to define aliases for images in httpd.conf and dad setup in wdbsvr.app; looks like it is consolidated in to dads.conf now. So I put entries as per the document above.
    1. What is the equivalent of cgi_env_list that exists in wdbsvr.app in dads.conf? I have to define this I think.
    2. Similarly is their equvalent directive for stateful = STATELESS_RESET in dads.conf?
    3. When I try to access the URL , I get this message in access log
    171.66.27.70 - APEX_PUBLIC_USER [25/Nov/2009:03:10:16 -0800] "GET /pls/apex/apex HTTP/1.1" 503 450
    172.27.36.10 - - [25/Nov/2009:03:10:18 -0800] "GET /" 200 13032
    172.27.36.11 - - [25/Nov/2009:03:10:21 -0800] "GET /" 200 0
    172.27.36.10 - - [25/Nov/2009:03:10:21 -0800] "GET /" 200 0
    172.27.36.11 - - [25/Nov/2009:03:10:21 -0800] "GET /" 200 17376
    172.27.36.10 - - [25/Nov/2009:03:10:23 -0800] "GET /" 200 17376
    172.27.36.11 - - [25/Nov/2009:03:10:26 -0800] "GET /" 200 0
    In error log I see
    [Wed Nov 25 03:10:16 2009] [error] [client 171.66.27.70] [ecid: 1259147416:171.67.39.198:32692:0:223,0] mod_plsql: /pls/apex/apex HTTP-503 ORA-12541 ORA-12541: TNS:no listener\n
    I am able to connect to sqlplus from the middle tier where I am trying to set this up and tnsnames.ora exists. Not sure why it is complaining about listener on the client machine.
    Any idea?
    MSK

    I solved 3. Basically I had wrong values for dbhost name :(
    If anyone can provide answers for 1 and 2, that would be be nice.
    MSK

  • How to use Edition Based Redefinition in APEX?

    Hello,
    This might be my first question on this forum ;-)
    I am trying to get 11gR2 Edition Based Redefinition to work within APEX. But for testing purposes (before altering the database to use the new edition as the default) I have to set the edition at the session level. But as APEX shares sessions from the pool (I might get another session with every page refresh/call), I need to execute an ALTER SESSION command.
    I can't use EXECUTE IMMEDIATE, 'cause that results in:
    execute immediate 'alter session set edition=HR_RELEASE2';
    ORA-38815 : ALTER SESSION SET EDITION must be a top-level SQL statement
    So is there a way to just run a SQL command at the "start" of a page (request)?
    Greetings,
    Roel
    http://roelhartman.blogspot.com/
    Edited by: Roel on Feb 28, 2010 7:00 PM
    - Changed the subject of this post (for an easier search on the forum)

    Hello all,
    Patrick and John were on the right track...
    After contacting Bryn (the Oracle brain behind EBR), there appeared to be a DAD attribute called 'database-edition'. Using this you can change the Edition of a DAD (and via the DAD ... all the users that use that DAD):
    begin
    dbms_epg.set_dad_attribute('APEX', 'database-edition', 'HR_RELEASE2');
    end;The funny thing is that a user doesn't have to re-connect. With the next server roundtrip he will use the other edition!
    Remarkable fact: This setting doesn't effect the Session-Edition, but only the Current-Edition. Have to test how that'll work out when using CrossEdition Triggers...
    Another thing: There seems to be an equivalent for the Apache /HTTP Server.
    You have to add a line to your dads.conf setting for PlsqlDatabaseEdition.
    If I add that line (in my environment) the HTTP Server fails to start with:
    /home/oracle/OraHome_1/Apache/Apache/bin/apachectl start: execing httpd
    Syntax error on line 48 of /home/oracle/OraHome_1/Apache/modplsql/conf/dads.conf:
    Invalid command 'PlsqlDatabaseEdition', perhaps mis-spelled or defined by a module not included in the server configurationApart from that: You have to restart the HTTP Server to use the changed DAD. So that is in opposite of the whole goal of EBR (24 x 7 availability).
    Once I figured it all out I'll write a blog post about it. If somebody has anything to add to this thread, feel free! Especially the HTTP Server/Edition combination would be interesting!
    Greetings,
    Roel
    http://roelhartman.blogspot.com/

  • How to implement enter-query , execute-query in Apex Forms

    Hi,
    I am new to Oracle Application Express. I want to know what is the equivalent of ENTER-QUERY and EXECUTE-QUERY features of Oracle Forms in Oracle APEX? I saw a lot of documentation, but everywhere I found that APEX forms only have 3 database actions, (1) INSERT (2) UPDATE & (3) DELETE.
    Does anybody know how we can do QUERY in APEX Forms? (like we do in Oracle Developer Forms).
    Thanks in advance.

    Oracle APEX is a web/ stateless environment. So you do not have the same functionality/ features as in a Oracle Forms environment which is session/state oriented.
    You can however achieve functionality similar to Enter Query / Execute Query through other means.
    The easiest is to use the Forms with Report wizard. It creates 2 pages, the first one is a report and the other a Form. Clicking on the Report rows takes you to the Form page in Edit mode where as the the Create button takes you to the Form in Insert mode.
    If you want to have the enter-query / execute query on a single page it will require significant effort and skills. Try it when you have acquired some more skills in Apex.
    In APEX , like any other web application, you have to think in the web paradigm and not client-server. Even Forms 11g is essentially client-server like and is session oriented through the forms applet.
    Regards,

  • Equivalent to EVAL function in PHP?

    Based on what option the user selects from my select list, my APEX report of type SQL query should be rendered.
    This works fine for situations like:
    SELECT * FROM table_name WHERE field_name = :P101_item_name
    But here I face the problem:
    In case the user selects option one, I want to fetch all rows, where field_name = NULL, if she selects the second option all rows with field_name <> NULL should be fetched. If she selects the third option, all options should be retrieved.
    I e.g. tried to create the static List of Values and assigned to the options the values "NULL", "NOT NULL"..
    yet
    SELECT * FROM table_name WHERE field_name is :P101_item_name
    does not work..
    How can I solve this? Is there any function similar to the eval function of php? Thanks a lot.

    In PL/SQL land the equivalent is EXECUTE IMMEDIATE - essentially allowing you to execute dynamic SQL.
    In APEX, you have various other options available to you. For instance, we can create PL/SQL anonymous blocks that return SQL or indeed functions that take arguments and return a SQL string. APEX will then handle the process of taking this string, EXECUTE IMMEDIATE'ing it, and returning your desired report.
    See here for a good discussion.
    Re: Passing a Table Name as a variable to a Page Process
    Also search for 'dynamic SQL', 'dynamic table names', 'dynamic LOVs' on the forum as this comes up regularly related to LOV filters.

  • ADF Faces or APEX for a lightweight browser-based front end.

    I'm tasked with prototyping a lightweight browser based front end to display consolidated customer information. It needs to be callable from half a dozen disparate and mostly non-Oracle applications. The idea is that each application will have a button that can kick off a browser session to see a data-warehouse sourced view of a customer. Forms10g (where my experience lies) seems too resource heavy for the constant opening/closing of this little application but APEX looks like a good fit with not too steep a learning curve and the guys on the forum thuoght it was well suited. ADF Faces seems to have a steep learning curve given that I don't have any Java experience but a small view-only app like this might be a good place to gain experience useful for more complex apps. My question is whether ADF Faces is a goot fit for this sort of task. If anyone has used ADF Faces and APEX I'd be very grateful for their thoughts.

    Thanks for those pointers Grant.
    Just a couple of further questions. As a company we're stuck on Internet Explorer 5.5 for another 18 months or so (>5,000desktops!). Does that exclude ADF Faces as an option given the prune-faced geriatric nature of the browser we're using (we're also on NT4.0 :-) Also, they're likely to be in and out of this screen like a fiddler's elbow and I'm wondering if the start-up effort using ADF Faces is likely to be significantly more resource intensive than an APEX equivalent.
    My background is Oracle*Forms (since 2.0) and it would be nice to make a start on a technology that could be used in place of Forms in more complex apps - I just need to be able to justify the likely increased costs to people focused predominantly on this project's costs.

  • Conver rdf file to the report in apex

    Hi,
    I have to migrate my report from rdf to apex... Is there any way to do it...
    Thought of doing converion to xml in middle. But perhaps, the form2xml doesn't accepts this xml file...
    any one please help me out on this..
    Thanks,

    There is no equivalent in the APEX environment.
    Classic/Interactive reports use SQL to generate a web page.
    BI Publisher could be used as an alternative reporting mechanism to generate PDF/office documents, but there is no reason why you couldn't call Oracle Reports from APEX - if you retain your application server, of course.
    The statement of direction for oracle development tools provides a good high-level overview of oracle's recommended options.
    http://www.oracle.com/technetwork/issue-archive/2010/toolssod-3-129969.pdf
    Scott

  • APEX on top of SQL Server

    Hello,
    We have a custom developed J2EE Financials App sitting on SQL Server. New reports and forms are costly for
    us from a development perspective. We are considering surfacing some of that data through APEX.
    From what I've found generating reports through a synonym on a db link looks pretty good.
    It looks to more complicated if we want to use Apex forms to manipulate the data in SQL Server.
    As anyone tried this and do they have advice or experiences to share?
    Thanks

    I'd just suggest for performance, put the bulk of your queries on these tables in SQL Server views. If performance becomes a big issue, pull the tables into a materialised view or equivalent dealy in Oracle.

  • Start working with APEX

    Dear All,
    I have Dev6i certification. I want to know
    1) if it is possible to develop a database application with APEX with all Developer's functionalities?
    2) How can I get complete guide or training on APEX?
    Thanks a lot

    Hi Khawar,
    +>> if it is possible to develop a database application with APEX with all Developer's functionalities?+
    Well, in general, you'll find that there are some things from client/server which don't have equivalent functions on the Web. Notice that I didn't reference just Developer 6i and APEX, this applies to really any situation when you go from client/server to HTML Web applications. In some cases, you'll find richer functionality in Application Express.
    +>> How can I get complete guide or training on APEX?+
    Well, you can start at http://apex.oracle.com. There are a number of links under "Getting Started".
    Good luck
    Joel

  • Using jQuery Ajax Call within ApEx - How?

    Hi,
    I was just wondering if it's possible to replace Oracle ApEx way of performing ajax calls with a jQuery Ajax call instead - just curious if I can call an On Demand process using jQuery Ajax means?
    Any examples would be much appreciated as unsure how to perform the equivalent process with jQuery.
    Thanks.
    Tony.

    I guess I found the solution for region pull for IR report
    using the syntax
    gReport = new apex.worksheet.ws('');
    in the js script below.
    When I pull the IR region from page8 into page1, I found that the IR toolbar's html/Js scripts are missing in Page1
    and thats why the IR toolbar functions were not working, issuing "gReport is null or not an object" error.
    But when I added the
    gReport = new apex.worksheet.ws('');
    syntax in the JS script below, the toolbar functions work using the p_arg_value.
    <script>
    function display_report(p1) {
    $s('P1_SELECTED_NODE',p1);
    $.ajax({
    type: "POST",
    url: "wwv_flow.show",
    data: {
    p_flow_id : $v('pFlowId'),
    p_instance : $v('pInstance'),
    p_flow_step_id : "4",
    p_request : "SUBMIT",
    p_arg_name : 'P4_SELECTED_NODE',
    p_arg_value : $v('P1_SELECTED_NODE')
    dataType: "html",
    success: function(data){
    var startTag = '<apex4ajax>';
    var endTag = '</apex4ajax>';
    var start = data.indexOf(startTag);
    if (start > 0) {
    data = data.substring(start+startTag.length);
    var end = data.indexOf(endTag);
    data = data.substring(0,end);
    $("#EMP_REPORT").html(data);
    //Workaround to make the report "pagination" and "order by" work
    $x_Value('pFlowStepId', "4");
    gReport = new apex.worksheet.ws('');
    //gValid = new apex.validation.v();
    //gReport.navigate.paginate('pgR_min_row=51max_rows=50rows_fetched=50');
    //gReport.controls.reset();
    </script>

Maybe you are looking for