This discussion is archived
4 Replies Latest reply: Nov 19, 2007 10:27 PM by 60437 RSS

Apex Application Computation bug

425090 Newbie
Currently Being Moderated
When you create an Application Computation and set it to run "On New Instance (i.e. Login)", APEX doesn't yet have the APP_USER in session state.

I have an application where depending on the current user, many application-wide variables should be initialized. If I cannot access the APP_USER item, this cannot be done by using an Application Computation.

My alternative is to create Page Computations for the application items on Page 1 (or whatever the default page is after logging on).
  • 1. Re: Apex Application Computation bug
    591018 Newbie
    Currently Being Moderated
    Tim,

    I am not sure I understand what you are asking here. Also could you provide what software and loadout you are using.

    Thank You
  • 2. Re: Apex Application Computation bug
    591018 Newbie
    Currently Being Moderated
    Tim,

    take a look here this may answer your questions:

    http://www.oracle.com/technology/pub/notes/technote_htmldb_vpd.html
  • 3. Re: Apex Application Computation bug
    425090 Newbie
    Currently Being Moderated
    Tim,

    I am not sure I understand what you are asking here.
    Also could you provide what software and loadout you
    are using.

    Thank You
    APEX: 3.0.0.00.20
    DB: Oracle9i Enterprise Edition Release 9.2.0.5.0 - 64bit Production

    We're already using VPD but there are some aspects of the system that have to be limited in the front-end rather than at the database level so that doesn't help my problem, but thank you for the suggestion.

    The problem is simple, the value of APP_USER is inaccessable at the time when an application computation is run if that application computation is setup to run "On New Instance (i.e. Login)".

    I've tried v('APP_USER'), :APP_USER and &APP_USER., and all return null, whether I use them in a SQL statement or even as Static Assignment.

    Hopefully that makes sense.

    Message was edited by:
    tim.mcguffin@gmail.com
  • 4. Re: Apex Application Computation bug
    60437 Employee ACE
    Currently Being Moderated
    Tim,

    You might want to put this "setup" code into the authentication scheme's Post-Authentication Process attribute. When this block is executed, APP_USER is set and it only executes once per session.

    Scott