Websheet functionality in normal apex application

Hellow,
I was wondering if it was possible to get some functionalities of the websheet aplications to a normal APEX application.
What i need is:
- The possibilitie to copy pase .xls data into a datagrid
- Have an existing dynamic report using that datagrid ("data selection" instead of "Saved Report")     
- Stil be able to insert, print, edit,...
This is just the websheet functionality "Create Data Grid" "Copy and Paste" , and then have a data selection on that datagrid.
Thanks
Mathias

Hellow,
I was wondering if it was possible to get some functionalities of the websheet aplications to a normal APEX application.
What i need is:
- The possibilitie to copy pase .xls data into a datagrid
- Have an existing dynamic report using that datagrid ("data selection" instead of "Saved Report")     
- Stil be able to insert, print, edit,...
This is just the websheet functionality "Create Data Grid" "Copy and Paste" , and then have a data selection on that datagrid.
Thanks
Mathias

Similar Messages

  • Websheets: create link to APEX application in same workspace

    Hi all,
    I'm trying some things with websheets in APEX 4.0.2 and I'm getting quite satisfied about it.
    Let's assume I have this situation:
    app_id 110 : database application with alias MAIN
    app_id 120 : database application with alias SEC
    app_id 130 : websheet application
    They all use the same authentication function, which works fine.
    App 110 and 120 use the same authentication cookie and there are links between these two applications. No problem at all.
    Now, I want to include links to and from the websheet application.
    The link to the websheet is easy: ws?p=130:HOME:&SESSION. So far so good and no log-in required.
    A link from inside the websheet application to a database application is something else.
    I've already found how to use markup syntax to link to another page in the same websheet
    [[HOME | Home link]]and to an external website
    [[http://www.oracle.com | Oracle]]But I can't find the syntax to link to a database application in the same workspace as the websheet.
    I could use
    [[http://<myserver>.<mydomain>/apex/f?p=MAIN:HOME | Home application]]But this is not working flexible. I want to leave out everything before f?p
    If I would install these three applications on antother server, my link won't work anymore.
    Also, I can't find a way to include the session id. &SESSION. isn't working. So with the above syntax, I would have to re-login in my database application.
    Then I tried this
    [[f?p=MAIN:HOME | Home application]]But this isn't working at all. The websheet shows me the create page wizard and fills in the name of the page: f?p=MAIN.
    Can anyone help me out on this?
    Am I expecting to much from websheets at the moment, is this a missing feature or am I doing something wrong?
    Thanks in advance!
    Regards,
    Bart

    Hi,
    Sorry originally I thought you were linking to websheets not from, I don't think websheets have the same capability as a database application, so i don't think apex picks up on substitution strings. Im not sure how processing with websheets work, but I think its very minimal.
    Ive tried it myself, is there a reason you need the session? If I leave the session blank I can get back to the database application, I cant vouch if you're starting from your websheet but I imagine that apex will fill it in for you as its an apex url.
    Cheers
    Huia
    Edited by: Hoppy on 05-Jan-2012 14:48

  • Integrate ApEx application with Websheet application

    I have links in my ApEx application branching to a websheets data grid. (another application)
    How should I do the setup to avoid the users to login again?

    Hi,
    I have the same requirement but didn't have any more luck. Is this possible?
    Session 0 doesn't work, &APP_SESSION. neither.
    We could try to hack the custom authentication schemes and build our own session sharing cookie mechanism. Did anybody try that?
    Thanks,
    ~Dietmar.

  • How to provide the user in an APEX application with low-vision apex option

    Hi I've a small problem I'm trying to solve but can't seem to find anything on this.
    The issue is this I've developed an application and the user can log on and use it successfully. For those users that are visually impared I need a link on my main application to a High Contrast version of the same application.
    Is this even possible.
    I don't want to have to create a new application using a high contrast theme, as I would need to maintain 2 applications in the end.
    Is there a way of changing the colors at run time to a higher contrast version.
    Many thanks.

    Hi,
    I just wanted to add to this discussion with some functionality introduced in APEX 4.1 that may help here. In APEX 4.1, we introduced a new 'High Contrast Mode' which basically identifies sessions as optimized for high contrast in the APEX development environment and websheet runtime. This allowed us to get around some issues we were having when a user was running in 'Windows High Contrast Mode' (where CSS background images are ignored) and also some issues with insufficent contrast. To read more about this mode, please see the 'About Constrast Mode' section in the 'Accessibility in Oracle Application Express' appendix here:
    http://download.oracle.com/docs/cd/E23903_01/doc/doc.41/e21674/accessibility002.htm#BABBCIJD
    Now, although this mode is available for use within your own database applications, it really only provides the framework for you to provision the mode and importantly, will not make any changes to your application (that's still up to you). But I think the framework is still useful and provides some nice API's to help you turn the mode on or off and also determine the status of the mode.
    I have setup a simple example to show you how this works:
    http://apex.oracle.com/pls/apex/f?p=11005:1
    It's rudimentary, just showing 1 region if High Contrast Mode is on, and another if it's off. This page has the following:
    1) Select list to select whether the mode is on or off.
    2) Page process to set the mode, depending on the select list value. This performs the following PL/SQL (showing the APIs you can use to switch the mode on or off):
    if :P1_HIGH_CONTRAST = 'Y' then
      apex_util.set_session_high_contrast_on;
    elsif :P1_HIGH_CONTRAST = 'N' then
      apex_util.set_session_high_contrast_off;
    end if;3) The region's have 'PL/SQL Expression' conditions that call another API that you can use to check if the current session is running in HC Mode. For example:
    apex_util.is_high_contrast_sessionOnce the mode is enabled, it will remain enabled for the length of the current session (or until it is switched off). To understand more about how you can use HC Mode, please see here:
    http://download.oracle.com/docs/cd/E23903_01/doc/doc.41/e21674/advnc001.htm#CIJCDGII
    So as I said, the example I gave as kinda simple. But you could easily extend this to say include an additional CSS file when running in HC Mode (containing the CSS styles and properties that would give you the increased contrast). You could do this by adding a page zero page process to run before header, that calls the apex_util.is_high_contrast_session API to determine if the current session is in HC mode, then include the CSS file if so. To see an example of this, please see here:
    http://download.oracle.com/docs/cd/E23903_01/doc/doc.41/e21676/apex_util.htm#autoId71
    I hope this helps, at least with the framework side of things, if you can upgrade to 4.1 at all.
    Regards,
    Anthony.

  • Flash contents not being displayed on the published Apex application URL

    I've had to publish one of my apex application through an bluecoat proxy to reach my Oracle HTTP server. It works fantastic for everything - except my flash charts. Flash contents are not getting loaded.Issue is only in the published application URL,the same application is working fine internally without proxy.
    Does anyone have any idea why this is failing and how I might fix this?.The bluecoat support enginner is having the following findings
    I am seeing some strange behavior when the browser goes through the
    proxy vs when it does not.
    When the browser uses the proxy the last thing it requests is the
    following(packet 354):
    GET /i/themes/theme_20/btn-bg.gif HTTP/1.1 Via: 1.1 GITS6ISA Cookie:
    WWV_CUSTOM-F_941005998277888_193=7DE31ABFD8D9E680 User-Agent:
    Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.19)
    Gecko/2010031422 Firefox/3.0.19 GTB7.1 (.NET CLR 3.5.30729) Host:
    ithelpdesk.anupcomp.ae Accept: image/png,image/*;q=0.8,*/*;q=0.5
    Accept-Language: en-us,en;q=0.5 Accept-Charset:
    ISO-8859-1,utf-8;q=0.7,*;q=0.7 Referer:
    http://ithelpdesk.anupcomp.ae/i/themes/theme_20/theme_3_1.css
    X-Forwarded-For: 86.98.85.117 Cache-Control: max-stale=0 Connection:
    Keep-Alive X-BlueCoat-Via: E2DE37912594ECAA
    HTTP/1.1 200 OK ETag: "1a887e1-92-4c2c5105" Content-Type: image/gif
    Last-Modified: Thu, 01 Jul 2010 08:25:41 GMT Server:
    Oracle-Application-Server-10g/10.1.2.0.2 Oracle-HTTP-Server
    OracleAS-Web-Cache-10g/10.1.2.0.2
    (G;max-age=3600+360;age=0;ecid=121853469393,0) Date: Tue, 25 Jan 2011
    07:52:55 GMT Accept-Ranges: bytes Content-Length: 146 Connection:
    Keep-Alive Age: 0
    That is the browser requests
    http://ithelpdesk.anupcomp.ae/i/themes/theme_20/btn-bg.gif and gets a
    200 ok from the proxy/server.
    When the browser does not use the proxy I see the following
    behavior(packet 2783):
    The browser requests
    http://anupserver:7777/i/themes/theme_20/btn-bg.gif 2 times, each time
    the server responds with a 304 not modified status, this means the
    browser has the most recent copy of the .gif file. The browser finally
    does a post to http://anupserver:7777/pls/apex/wwv_flow.accept. Given
    that the browser gets a 200 ok response from the proxy when requesting
    http://ithelpdesk.anupcomp.ae/i/themes/theme_20/btn-bg.gif and then
    stops requesting data, we need to understand why the browser is behaving
    differently without the proxy(i.e. why does it request the content 2
    times and why is it doing the post). The interaction between the
    browser and the proxy appears normal, a 200 ok response with content is
    normal, why does the browser stop requesting content?
    GET /i/themes/theme_20/btn-bg.gif HTTP/1.1 Accept: */* Referer:
    http://anupserver:7777/pls/apex/f?p=193:1 Accept-Language:
    en-us,ar-ae;q=0.5 Accept-Encoding: gzip, deflate If-Modified-Since: Thu,
    01 Jul 2010 08:25:41 GMT If-None-Match: "1a887e1-92-4c2c5105"
    User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET
    CLR 1.1.4322; InfoPath.1; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152;
    .NET CLR 3.5.30729) Host: anupserver:7777 Connection: Keep-Alive
    HTTP/1.1 304 Not Modified Date: Sun, 13 Feb 2011 12:42:01 GMT Server:
    OracleAS-Web-Cache-10g/10.1.2.0.2 Content-Type: text/html Connection:
    Keep-Alive Keep-Alive: timeout=5, max=999 Content-Length: 0
    GET /i/themes/theme_20/btn-bg.gif HTTP/1.1 Accept: */* Referer:
    http://anupserver:7777/pls/apex/f?p=193:1 Accept-Language:
    en-us,ar-ae;q=0.5 Accept-Encoding: gzip, deflate If-Modified-Since: Thu,
    01 Jul 2010 08:25:41 GMT If-None-Match: "1a887e1-92-4c2c5105"
    User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET
    CLR 1.1.4322; InfoPath.1; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152;
    .NET CLR 3.5.30729) Host: anupserver:7777 Connection: Keep-Alive
    HTTP/1.1 304 Not Modified Date: Sun, 13 Feb 2011 12:42:02 GMT Server:
    OracleAS-Web-Cache-10g/10.1.2.0.2 Content-Type: text/html Connection:
    Keep-Alive Keep-Alive: timeout=5, max=999 Content-Length: 0
    POST /pls/apex/wwv_flow.accept HTTP/1.1 Accept: image/gif,
    image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash,
    application/vnd.ms-excel, application/vnd.ms-powerpoint,
    application/msword, application/x-ms-application, application/x-ms-xbap,
    application/vnd.ms-xpsdocument, application/xaml+xml, */* Referer:
    http://anupserver:7777/pls/apex/f?p=193:1 Accept-Language:
    en-us,ar-ae;q=0.5 Content-Type: application/x-www-form-urlencoded
    Accept-Encoding: gzip, deflate User-Agent: Mozilla/4.0 (compatible; MSIE
    6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; InfoPath.1; .NET CLR
    2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729) Host:
    anupserver:7777 Content-Length: 262 Connection: Keep-Alive
    Cache-Control: no-cache

    Hello Orton,
    I think this has something to do with network access, may be a firewall restricting access to the server.
    Thanks,
    Machaan

  • SSO for Oracle Apex application

    Hi All,
    I am working on the requirement where the client want to implement the SSO for the apex application which are in different workspaces.
    But not using oracle SSO server :(
    The Microsoft active directory is used for authentication.
    Please give me some idea how to implement SSO for these apex applications.
    Thanks & Regards,
    Prutha

    Hi,
    I am trying to implement Single-Sign On for my Apex applications. Below are the requirement steps:
    This is working fine within same WORKSPACE and on single DB, but I need to implement SSO across DB with different workspaces.
    1. I have *2 Databases* DB-1 and DB-2. Both are different and running on different machines.
    2. On Both DB's Apex is configured.
    3. I have to deploy an app which uses internal Application Express account credentials for Login on DB-1
    4. From DB-1, after login, I have to provide a link to open another Apex App deployed on DB-2
    5. All Apex Apps on both DB's are using same Authentication Schemes.
    6. In both DB's I have PAGE SENTRY function for session validation.
    Can we configure Apex only once on both DB servers like RAC. Do we have any admin setting in Apex by which we can achieve th motive.
    Please help me to implement such functionality using only Apex across different DB's and different Workspaces.
    Thanks,
    Ismail
    Edited by: user9536278 on Mar 27, 2012 4:18 AM

  • Can multiple APEX application use the same parsing schema?

    Hi,
    I have 4.2 APEX thru pl/sql Gatewat, 11gr2 DB and using theme 24.
    Due to the APEX limitation for version control I would be splitting 1 big ERP applications into 24 different APEX applications and each application would be considered as 1 unit for version control.
    I have about 800 tables and I would assume that all of these would need to be stored in 1 schema since a lot of these table are linked thru FK.
    Can I have multiple APEX APPS using the same parsing schema? or is there a better way to do this?
    Thanks in advance!

    Hi,
    Multiple applications can have same (one) parsing schema.
    You can test that on e.g. apex.oracle.com, where normally you have only one schema and you create multiple applications and all use that same schema.
    Regards,
    Jari
    My Blog: http://dbswh.webhop.net/htmldb/f?p=BLOG:HOME:0
    Twitter: http://www.twitter.com/jariolai
    Edited by: jarola on Jan 28, 2013 7:15 PM

  • Integrate an Apex Application with the E-Business Suite 11i

    Hi !
    I'm currently working to get connected to APEX (Application Express 3.2.1.00.11) using an E-Business Suite 11i form function then using the ICX cookie.
    I'm using a document created by Rod West(consultant at Cabot Consulting) to help me doing this connection.
    The document is : http://www.oracle.com/technology/products/database/application_express/pdf/apex_ebs_wp_cabot_consulting.pdf
    I always have errors when I try to get connected using the method suggested in the document.
    The error I have received is :
    ORA-00942: table or view does not exist ORA-00942: table or view does not exist ORA-06512: at "APPS.ICX_SEC", line 2388 ORA-06510: PL/SQL: unhandled user-defined exception
    This error seems to come from wfa_sec.getsession(:P101_USERNAME) used in the Before Header process of the login page(Page101).
    See code here (Figure 10 in the document) :
    BEGIN
    wfa_sec.getsession(:P101_USERNAME);
    :P101_PASSWORD :=
    XXAPX_SECURITY_PKG.generate_hash
    (FND_GLOBAL.user_name);
    IF :P101_PASSWORD IS NOT NULL THEN
    APEX_CUSTOM_AUTH.login(
    P_UNAME => :P101_USERNAME,
    P_PASSWORD => :P101_PASSWORD,
    P_SESSION_ID => v('APP_SESSION'),
    P_APP_PAGE => :APP_ID||':1'
    END IF;
    EXCEPTION WHEN OTHERS THEN NULL;
    END;
    I have done a "GRANT EXECUTE ON apps.WFA_SEC" to my APEX Schema, so the APEX Schema should have access to everything used by the package... I have tried to "GRANT EXECUTE ON" ICX_SESSIONS but I still have the same error...
    Do I need to do other "GRANT" ? Have you experienced the same problem ?
    Thanks for your help !

    Hi !
    Yes, I have already created synonyms but I still got the same errors...the error seems to be related to a table used in the package icx_sec...I have tried to grant and create synonym for tables icx_transactions and icx_sessions but I still got the error. Any ideas ?
    I have also tried to use the method (OWA_COOKIE.send) suggested in the 2007 version of the Rod West's document (the method you mentionned in the thread) and I'm able to get connected to my APEX application using the E-Business Menu but I have an intermittent problem with this method.. In fact, some days I'm able to get connected to APEX at the first try but some days I received "Invalid Login Credentials" at the first try and at the second try I get connected...And we haven't found any reasons yet for the intermittent "Invalid Login Credentials" ?
    Have you experienced the same intermittent problem on your side ?
    Thanks !

  • Unit testing PL/SQL used in APEX application

    question from my customer :
    I am developing an application in Oracle Application Express and am working on unit tests for the PL/SQL stored procedures and packages that are stored in the underlying database and that are used by the APEX application. These unit tests should run within the SQL Developer Unit Test framework.
    The problem is that some of the PL/SQL code stored in the database uses functions like NV('APPLICATION_ITEM') to access items in the apex application. These do not return any values when I try to execute the PL/SQL within the unit test framework, ie through the backend. While it is good that the NV function does not error, NULL do not really work well in my scenario either (for example when the result of this functions is inserted into a NOT NULL column of a table). I can think of a few workarounds, such as creating my own NV function inside the test schema to return desirable values, but nothing seems a really satisfactory solution. I just wonder if there is any best practice recommendation from Oracle for this scenario - how can I run code that uses APEX-specific functions through the back end. I could not find anything in the APEX documentation for this but I'd be interesting to know if there is any recommendation how to best deal with this case.
    I am using SQL Developer version 4.0.0.13.80

    User[[:digit:]*
    Your PL/SQL Package APIs are poorly designed.
    You need to take Tom Kyte's quote to heart:
    "Application come and application go, but data remains forever"
    In short, you need to separate your database processing code (the stuff you need to unit test) from front-end/middle tier code.
    (repetitiveness is for effect.. not rudeness.)
    As such, The PL/SQL code that you need to 'UNIT TEST' must work without needing to run in APEX.
    The PL/SQL code that you need to 'UNIT TEST' must work without needing to run in .NET.
    The PL/SQL code that you need to 'UNIT TEST' must work without needing to run in JSP.
    The PL/SQL code that you need to 'UNIT TEST' must work without needing to run in Jive.
    The PL/SQL code that you need to 'UNIT TEST' must work without needing to run in Ruby.
    The PL/SQL code that you need to 'UNIT TEST' must work without needing to run in Perl::CGI.
    The PL/SQL code that you need to 'UNIT TEST' must work without needing to run in P9.
    The PL/SQL code that you need to 'UNIT TEST' must work without needing to run in <place latest and greatest thing here>.
    Again, I don't mean to sound rude.  I'm just trying to reinforce the idea that you need to separate database code from middle-tier/front-end stuff.
    Basically, you will need to separate all of your packages into multiple parts.
    a _CORE package (that will be unit tested) that does all the hard work
    an _APEX package for APEX infrastructure (this works with NV()/V(), etc.)
    a _NET package for .NET infrastructure when you need it
    a _JSP package for the JSP infrastructure when you need it
    a _JIVE package for the JIVE infrastructure when you need it
    a _<place latest and greatest thing here> for the <place latest and greatest thing here> when you need it.
    MK

  • Best Practice for implementing dual APEX applications environment

    Question:
    We are in the early stages of building an APEX application for Oracle SaaS consumption. The question I wanted to ask you is what would be the best way to deploy this app for production? Would it be easier just to create a new workspace in apex.oraclecorp.com and export the app definition or create a new instance of APEX container? Also, if we were to create a new container then what are all the hardware/middleware required?
    Follow up questions:
    1. What are you building and for what purpose?
    We are building an application for oracle employees (development, operations, and support) to assist in interacting with the CRM Saas environments. Entering bugs, tracking patch level, obtaining relevant environment contacts & urls.
    2. Who will be installing this application? Oracle customers? In their own on-premise APEX instances? Oracle Cloud?
    For the foreseeable future, there will only be the one internal install for internal use (CRM SaaS Enablement Team, DevOps).
    3. What are the database and APEX version requirements you'll have for this application?
    We do not have a particular requirement. The latest GA version would be the best candidates.
    4. Is it safe to say that there is minimal understanding & experience of APEX on your team?
    All we know is self-taught and from forum responses. Part of the problem we face is that we don’t know how to frame the questions in a way they can be understood.
    APEX container - By this I mean a fully functional APEX environment where applications can be deployed to.
    Use Case - We want to be able to make our Apex app available to the consumer (see above) and also continue to develop new features into that app for use at a later date. We are asking for information about a development model that works well for Apex apps.
    Thanks!!

    Moved the question to the internal Oracle forum:
    http://myforums.oracle.com/jive3/thread.jspa?threadID=1058413

  • Mails are not going from apex application

    Hi,
    Mails are not going from my apex application. I had done the instance settings by logged in as admin. SMTP port is also connecting. Please help me to solve the issue.

    Hi,
    Mail queue is vacant. I think the problem is with the process. No process or validations are working. Actually, I have copied this application from another schema. Is there is need to set anything?..I had regenerated all the tables,functions,triggers in my schema .Processes and validations are completely inactive

  • Insert a record into a table through email in an Oracle APEX application

    I developed an Oracle APEX application, there is a table called events. I can insert/update/delete a record in the table through browser. I am thinking in order to quickly do the data entry, user should be able to send an email, then the table should be inserted with values from email address, timestamp, subject and body. Anyd idea how to realize this functionality?
    - Denis

    Start by checking whether your mail server provides any API's for accessing emails , if it does you might be able to reduce a lot of work by using some kind of web service consumer from apex to your mail server. In any case your implementation is going to be dependent on your Mail Server configuration.
    Your problem breaks down to reading/accessing mails from the mail server from PLSQL (apex is driven by PLSQL).
    I found this other thread which could be of some use.
    WAY TO ACCESS A MAIL SERVER FROM ORACLE APEX
    <li>The following package might solve your problem directly(from carsten czarski of the German Apex community)
    [url http://plsqlmailclient.sourceforge.net]http://plsqlmailclient.sourceforge.net
    PS: POP3 support is still TBD.
    <li>I also found this posting in the orafaq forums which lists a java method and PLSQL code bit for it for accessing emails via POP3
    [url http://www.orafaq.com/forum/t/80928/2/]http://www.orafaq.com/forum/t/80928/2/
    If these do not work for you, find some java library to read mail from your server, write a PLSQL wrapper for it and use it in a scheduled job(DBMS_JOB)/a PLSQL block triggered from Apex.
    If you get stuck there, find some utility that can read mails, invoke them from your DB using java,shell scrpt,dbms_scheduler etc and use the utility's function for the rest.
    NOTE: I haven't tried any of these utilities and you must validate any java code before running them on your environment.
    Since aren't really much restrictions(other than spam checks) in sending a mail to your mail account, you might want to consider filtering out the mails from which you create records.

  • Executing queries in another schema in an APEX application

    Hello all,
    I'm using Application Express 2.1.0.00.39 with Oracle Database Express.
    Following this post (Re: Including a SQL GUI in APEX applications I made a page that executes users' queries. The user inputs his SQL statement in a textarea and submits the page, then a new region returning the query results is displayed. Actually I did hardly the same as Vikas did here: http://htmldb.oracle.com/pls/otn/f?p=24317:228:4426360772935581::NO:::
    However my needs are very specific: as there will be a lot of users and all users will have their own schema, I need to execute the queries a user inputs in his own schema and not the default parsing schema.
    I looked around and found a few solutions.
    First, GRANT. But I can't grant the default schema priviledges on all users' schema. It will permit everyone to work on all schemas and I don't want that. I want to force the parsing schema to be the same as the user authentified.
    Next, I found that post: Re: how to connect to another user from a named pl/sql block. I tried the EXECUTE IMMEDIATE but it won't work with the CONNECT statement.
    Finally I found that post: Change Parsing Schema dynamically? I tried to put the ALTER SESSION in a process. The success message appears, meaning the statement was executed successfully. But the query in input is still executed in the APEX default parsing schema. Then I tried to put the ALTER SESSION statement in the Report (which is a PL/SQL function body returning a SQL query), like that:
    BEGIN
    EXECUTE IMMEDIATE 'ALTER SESSION SET CURRENT_SCHEMA=:APP_USER';
    RETURN v('P2_QRY_TEXT');
    END;
    It didn't work either.
    What should be the best practice for my problem? Is there anyway to do what I want?
    Thanks,

    Re-thinking my solution:
    Instead of having the package for each user, make 1 schema hold the package (whichever represents your system and not a user). Then declare the package to run as AUTHID CURRENT USER, which should make the calling schema's privileges be active. That way you avoid the hassle of having the manage 1 package for each user.
    User Shema ===(SQL QUERY)==> Your System's Schema ==(QUERY) ===> Your Package w/ Authid Current User ==(Dynamic SQL Execution) ==> END
    For your package, you might want to consider implementing/simulating variable argument lists, so that you can provide binds if necessary. You would just match up the binds within the query (using dbms_sql would be the only way, execute immediate does not give supporting query information) to the corresponding arguments.
    I'm not sure what your goal is, but at least you have a direction to run in/at.

  • Sys_context not working from APEX application / environment

    I am struggling to retrieve a user-defined context value using sys_context(...) from APEX application / environment
    I have created a global context to be used as a storage mechanism for log severity to be recorded.
    CREATE OR REPLACE CONTEXT PA_LOGGER_CTX USING PA_LOGGER ACCESSED GLOBALLY;It is seeded through a function pa_logger.set_severity(1) within the package pa_logger through (excerpt):
      dbms_session.set_context(c_ctx_context_label, c_ctx_severity_label, TO_CHAR(p_severity_in));
      with:
      c_ctx_context_label     CONSTANT NVARCHAR2(16) := 'PA_LOGGER_CTX';
      c_ctx_severity_label    CONSTANT NVARCHAR2(8) := 'SEVERITY';
      p_severity_in   IN  PLS_INTEGERusing the following from sqlplus, other DB-tools, works as expected:
    -- setting it
    BEGIN
      pa_logger.set_severity(2);
    END;
    -- displaying it
    SELECT sys_context('PA_LOGGER_CTX', 'SEVERITY') FROM DUAL;returns 2
    This works from different sessions, different users ... no problem.
    Using it from within an APEX (accessed via embedded gateway/XE11.2 or OHS/11.2.0.2.0 ) application or even from the "SQL Commands" from the APEX Workspace returns a NULL value for :
    SELECT sys_context('PA_LOGGER_CTX', 'SEVERITY') FROM DUAL;And
       SELECT value  FROM GLOBAL_CONTEXT WHERE NAMESPACE='PA_LOGGER_CTX' and ATTRIBUTE = 'SEVERITY';returns the right value, which obviously defies the purpose of using the CONTEXT.
    It is as well possible to set the CONTEXT to a different value, which is picked up outside APEX, but even so using sys_context does not work, always returning NULL
    As a note aside: using sys_context with a standard CONTEXT, e.g. SELECT sys_context('USERENV', 'NLS_DATE_FORMAT') from DUAL works without any problems.
    I guess I have a conceptual break somewhere. Does this have to do with the APEX user used, wrapping within the APEX environment, the way the context is defined ....
    Any help is appreciated.
    Many thanks,
    - Thomas

    Hi Rod,
    Thanks for the time to answer. Meanwhile I found some more hints on the subject (Retrieve values from my own global context in Apex and I do now understand the concept.
    I understand that I can even clear the specific CLIENT_IDENTIFIER by issuing a "dbms_session.clear_identifier()", which then subsequently works
    Looking at the CLIENT_IDENTIFIER as set by APEX it is "<apex_login_user><apex_session>";
    I understand it is set for every DISPLAY-SUBMIT it is reset by the APEX framework.
    Hence it is not sufficient to set it for a user session; it needs to be changed for every display-submit. I can achieve this through application processes, but I am really reluctant to do so, because I do not know, if APEX relies on the CLIENT_IDENTIFIER to be set the way it is done. I suspect a purpose behind this, causing me problems elsewhere. I post this as a seprate question as this question has been answered.
    On to your point about: Using a table variable. This is the way it works currently, but allegedly using the CONTEXT would give us for the logging configuration a performance gain of about 1 dimension..... but unfortunately other problems..
    Thanks!
    - Thomas

  • Return apex application schema

    Hi
    Let's say I have an apex application named "ABC" based in the schema "ABC".
    I also have a schema "XYZ" that hold procedure used by every other schema.
    For logging purpose, at some point I want to find which application is calling "XYZ".
    I would normally use SELECT USER FROM DUAL to return "ABC" which works fine when called from toad, but in this case, because of Apex, the result is "ANONYMOUS".
    Also, SELECT SYS_CONTEXT('USERENV', 'CURRENT_SCHEMA') FROM DUAL ; will return "XYZ".
    I am out of ideas to find the original apex schema.
    Thanks.
    Sebastian

    To get the app schema, try the <tt>apex_util.get_default_schema</tt> API method.
    However its more usual to use the built-in <tt>APP_USER</tt> substitution string to get the identity of the currently authenticated user.
    (Please update your forum profile with a better handle than "user13342055".)

Maybe you are looking for