Application item value disapeared in other pages

Hi
I have created an application level item called F111_USER_AUTHENTICATION and this item is populated in the calculation section of the login page 101.
The calculation is performed under rendering with before header and F111_USER_AUTHENTICATION is populated correctely according to some other condition in the page. I found item is populated correctly in login page when the page is loaded from a plain html page.
But when i try to access this variable from common page 0 , value in this item is null.
Why is the item get nullify. What is the best place to initiailzed the application level items in login page. (As apage process, or computation or else)
Thanks
Manjith

Manjith - Your description is unclear on several points. Please put an example on apex.oracle.com and we can help you fix it straight away.
Scott

Similar Messages

  • PAGE RADIO BUTTONS and APPLICATION ITEM VALUE

    I have several pages that use same radio button group that permits filtering the report query (of course on each page, it is a page level radio button item).
    I created an application item value to hold the last used value of a radio button item.
    On login, I would like the application item value set to a default value.
    For a given page using the recurring radio button group item,
    I would like the radio button item value set to the application item value on entry into a page.
    I would like the report to use the application item value on entry to a page.
    I would like the application item value be updated anytime the page level radio button item value is changed, so that when you move to another page,
    the next radio button group and report can use the last selected radio group button value.
    I am trying to use a variety of solutions in COMPUTATION and CONDITIONAL COMPUTATION... to include use of set_session_state procedure, and I am not getting desired result, partial success, but not complete.
    Can you have a computation item that is only for initialization of the report and radio button group on page entry?
    And a separate computation item that senses user selection of another radio button, updating the report, and updating the application level item?
    Help requested. Thank you.
    Would be nice to have application level objects, like radio button groups.

    Created Page 0
    Created an HTML region in COLUMN 2 and SEQUENCE 10.
    Selected under region CONDITION:
    Current Page is contained within Expression 1 as comma delimited list of pages
    in the EXPRESSION 1 provided the requested comma delimited list of pages that I wished the HTML region to appear.
    Created the radio button group item P0_RADIO and assigned to Page0 HTML region.
    Selected under item CONDITION:
    Current Page is contained within Expression 1 as comma delimited list of pages
    in the EXPRESSION 1 provided the requested comma delimited list of pages that I wished theradio button group to appear.
    In SHARED COMPONENTS I created an APPLICATION COMPUTATION
    In the computation I created a PL/SQL function to initialize the radio group
    BEGIN
    IF :P0_RADIO IS NULL THEN
    RETURN 'A_ALL';
    ELSE
    RETURN :P0_RADIO;
    END IF;
    END;
    'A_ALL' being the default value for :P0_RADIO
    Radio group appears on the desired pages, is initialized to the desired default value, and works properly on each page.

  • How to pass Application Item value in Javascript function.

    Hi,
    I have the following javascript in the HTML Form Element Attributes properties
    I am on Page1 and passing P1_DEPT_NO page item value. This is working perferctly fine and I am able to get the exact value of the page item
    onchange="javascript:function1($x('P1_DEPT_NO').value);"I am on Page1 and passing Application Item G_DEPT_NO value.
    The problem here is, I am not getting the Application item value inside the javascript function.
    I tried using alert(); and it's giving me value as undefined
    onchange="javascript:function1($x('G_DEPT_NO').value);"Just want to know, how to pass the Application Item value in Javascript.
    Thanks,
    Deepak

    Deepak,
    I am not an expert at Javascript, but the suggestin I made was because javascript is a case-sensitive language.. and therefore onChange is not the same as onchange.
    Not quite sure if that is causing the problem.
    Application items are not associated with a page and therefore have no user interface properties.
    Therefore, as mentioned in another post, the rendering would not work for application items.
    If it is for a single item, used only in this page, you could create a hidden page item and use it fo your purpose
    If you still want to look at application items and AJAX, This page contains examples of using AJAX to solve problems like the one you mentioned.
    http://www.oracle.com/technology/obe/hol08/apexweb20/ajax_otn.htm#t1b
    Thanks,
    Rajesh.

  • AjaxRequest not assigning Application Item value

    Hello,
    I have an application item called DESTINATION_PAGE and a page item called P63_NEXT_PAGE. I have an Application process that does the following:
    declare
    begin
    select get_page(:PLATFORM) into :DESTINATION_PAGE from dual;
    htp.p(:DESTINATION_PAGE);
    end;
    This is my AjaxRequest in P63 Header:
    function getPage(platformID){
    var ajaxRequest = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=GET_PAGE', 0);
                             ajaxRequest.add('PLATFORM', platformID);
                             ajaxRequest.add('APPLICATION_ID', $("#P63_APPLICATION_ID").val());
                             ajaxResult = ajaxRequest.get();
    $("#P63_NEXT_PAGE").val(ajaxResult);
    alert($("#P63_NEXT_PAGE").val());
    $("#DESTINATION_PAGE").val(ajaxResult);
    alert(&DESTINATION_PAGE.);
    From my above 2 alerts, the page item (P63_NEXT_PAGE) gets the correct page number of 14, but the application item (DESTINATION_PAGE) still has the old page number of 63! Please help, this is really frustrating because I need to use the Application Item in a URL request. I've tried using $s('DESTINATION_PAGE',ajaxResult) as well as additional functions, but my Application Item still is not updating correctly.
    Thanks in Advance!
    Johnny

    Hello Jarola,
    I have tried using the SET_SESSION_STATE, but the problem is I need to grab a new value from a select list prior to assigning value to the Application Item. Here is my new DA that I created to set session state. The problem is that P63_PLATFORM_ID still has the old value at this point which is why I thought I had to use an AjaxRequest:
    declare
    page_no number;
    BEGIN
    select get_page(:P63_PLATFORM_ID) into page_no from dual;
    APEX_UTIL.SET_SESSION_STATE('DESTINATION_PAGE',page_no);
    END;
    Any idea how I can get the new value in P63_PLATFORM_ID prior to running the above PL/SQL DA?
    Thanks,
    Johnny

  • How to create a view in sql workshop depending on an application item value

    Hello,
    How coud I create a view in SQL worshop based on an application item value? For example select id, name
    from gg_provider
    where user = ' || :USER
    So basically each user would have it's own view. But it does not work like that. I think when I use :USER then the database takes database user not the user logged in to apex application. How would be possible to use application user to create the view?
    Thank you very much.

    Instead of
    :APP_USER
    use
    v('APP_USER')
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • Need help in use of application item - value to be changed dynamically

    HI ,
    i have created a application item and i want to change the value of the application item when user link the URL link
    for eg- I have two link -
    htp.p('<tr><td>AABB<td>');
    (a href="f?p=&APP_ID.:6:&SESSION..:F129_DB_NM:XXXXX">page 1)
    htp.p('</a></td>');
    (a href="f?p=&APP_ID.:6:&SESSION..:F129_DB_NM:YYYY">page 2);
    htp.p('</a></td>');
    If user click first link then i want the value of application item shuld chnage to XXXXX and it pass the same to page 1.
    and vice versa.There is no if condition in this.
    Please let me know on this.What i need to do in this more.
    Edited by: 946963 on Oct 22, 2012 4:06 AM

    946963 wrote:
    thanks for this .I have links with me its working fine.
    Problem is that it is not chnaging the value of application item .
    When i click on first link then i want to pass value XXXX for applicationitem for page 1 and value YYYY for page 2.This same value i have to pass further to page 3.
    How can i do this Please let me know on this.Have you opened the link that I gave in my prev post??
    //change your code to look like this
    //notice the colons before your application item
    htp.p('<tr><td>AABB<td>');
    (a href="f?p=&APP_ID.:6:&SESSION..::::F129_DB_NM:XXXXX">page 1)
    htp.p('</td>');
    (a href="f?p=&APP_ID.:6:&SESSION..::::F129_DB_NM:YYYY">page 2);
    htp.p('</td>');

  • Trying to set application item value through javascript

    Hi,
    I am not sure what I am doing wrong here can someone possibly shed some light? I have the following in my
    HTML Header of my login page
    <script language="JavaScript1.1" type="text/javascript">
    function setAppItem(val){
      var req = new htmldb_Get(null, &APP_ID., 'APPLICATION_PROCESS=dummy', 
      &APP_PAGE_ID.);
      req.add('F_LOGIN_MESSAGE', val);
      var gReturn = req.get();
      req = null;
    </script>
    <script language="JavaScript1.1" type="text/javascript">
    function doLogin()
      var err = false;
      alert(document.getElementById('P101_USERNAME').value);
      if((document.getElementById('P101_USERNAME').value == '') ||
        (document.getElementById('P101_PASSWORD').value == '')) {
        setAppItem('You must enter a username and password.');
        err = true;
      if(!err) {
        doSubmit('Login');
    </script>The setAppItem function does get called but it is not setting the application items text?
    Thanks in advance for any help!

    Thanks for all of your help Jari it is appreciated!
    For others the solution was to add the following to my HTML Source
    <div id="LOGIN_MESSAGE"></div>and then created the javascript routine
    <script language="JavaScript1.1" type="text/javascript">
    function setAppItem(val)
      $x('LOGIN_MESSAGE').innerHTML=val;
    function doLogin()
      var err = false;
      if($v('P101_USERNAME') == '' || $v('P101_PASSWORD') == '')
        setAppItem('You must enter a username and password.');
        err = true;
      if(!err)
        doSubmit('Login');
    </script>
    Thanks

  • Application Item values in Session State in APEX 4.2

    In 4.2, I am not able to see the session state values of my Application Items if I click "Session" at the bottom of a page. We just migrated from 4.1 and we login to a separate app than where we land upon login. I thought the "Global" scope of the Application Item would allow this to track across apps, but its not working. Is this a known issue?

    fac586 wrote:
    Johnny98 wrote:
    In 4.2, I am not able to see the session state values of my Application Items if I click "Session" at the bottom of a page. We just migrated from 4.1 and we login to a separate app than where we land upon login. I thought the "Global" scope of the Application Item would allow this to track across apps, but its not working. Is this a known issue?When you say +"Global" scope of the Application Item+ do you mean the true global scope introduced in APEX 4.2, or are you using the term colloquially, as in "not a page item"?The new global scope introduced in 4.2
    >
    Johnny98 wrote:
    I login to App 1, but land in App 2. My Application Item lives in App 2. Upon login of App 1, an authentication scheme calls a back end function that assigns variables to the Application Item in App 2. What back end function? How does this function assign values to application items in App 2?APEX_UTIL.SET_SESSION_STATE('APP_ROLE', rec.user_type);
    >
    In APEX 4.1 I can see the session state of my Application Items by clicking on the Session button. I cannot see the session state of Application Items after moving everything to APEX 4.2.Have you selected Application Items from the View select list on the session tab and clicked the Set button?Yes, thats what started this thread

  • Can't update an Application Item value

    Hi
    In my application i have to Know the logged in user's role and group, that's why i created 2 Application Item
    APP_USER_ROLE
    APP_USER_GROUPE
    I have a LOV that return two values separated by a ";". the first one is the user's role and the second is the user's group
    I defined an "On demand process" this process is called when the LOV value change
    that's the code
    *<script>*
    */* This method stores the value of source items into the session*
    *function setSession() {*
    var get = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=V_DUMMY',&APP_PAGE_ID.);
    gReturn = get.get();
    var itemValues = $v('P1_USERS_ROLES').toString();
    var itemList= itemValues.split(';');
    get.add('APP_USER_ROLE',itemList[0]);
    get.add('APP_USER_GROUPE_Y', itemList[0]);
    alert ($v('APP_USER_ROLE'));
    get = null;
    *</script>*
    the Alert Message display an empty messagebox!
    i tried another methode
    i copied the result to a textfield in the form P1_X and P1_Y
    *$s('P_X', itemList[1]);*
    *$s('P_y', itemList[1]);*
    get.add('APP_USER_ROLE',itemList[0]);
    get.add('APP_USER_GROUPE_Y', itemList[1]);
    always the same empty message box
    Details
    i'm using
    Oracle Applcation Express 4.1 under Oracle 11g R2 database
    OS: RedHat Enterprise Linux 4.1
    Client
    OS: Windows 7 professional X64
    Browser Mozilla Firefox 10.0.2
    Chrome 17.0.963.56 m
    Internet Explorer 9
    Edited by: user482143 on 3 mars 2012 07:19

    Michael Sullivan wrote:
    From time to time, I cannot drag a newer version of a program to the Apps folder. Recently it was Toast 9 and iSquint.
    With Toast at least, you should uninstall the previous version first. You can do this by moving it into a subfolder, marked, say StaleToast and you will be prompted for a password to move it.
    When I recently updated Toast, that is what I did and I simply got the usual password request.
    I do not keep Toast directly in the Application folder, but in a subfolder named Toast. Not sure if this is why I don'[t experience your problem.
    If I attempt to I get a message saying I do not have permission.
    I am an administrator.
    My work around is to delete the App (I have to put in a password to do that) then drag it to Apps.
    As I noted, for Toast, this is the way since the App has system hooks and must be uninstalled properly.
    Can I fix this for good?
    I don't think it's broken, IMO.
    Most apps that hook into the system files require a password to remove them for obvious reasons.

  • Trouble with carrying values over to other pages and calculating

    Hi folks - I have a calcuation I'm trying to do with five fields.  Three of the fields come from other pages in my PDF (there are 10 pages total).  When the first value gets carried over to my calculation, that number should show up in my 'Total' field but it isn't.  I think it's b/c the other two fields which get carried over from other locations in my PDF, if they haven't been entered into the form yet, are basically NULL.  Hence the calcuation doesn't work (just shows zero in my 'Total' field).  However, if values are placed into these other 2 fields in my PDF, the calucaltion and subsequent 'Total' works.  Not sure how to resolve this?  Thanks!

    Hi GKaiseril,
    Thanks for replying...no javascript errors.  Not sure how to determine the order, or where that is shown?
    The first 2 fields get carried over, and added together as follows:
    event.value = this.getField("Total endowment care fund corpus, reserves, and unexpended income").value + this.getField("Ending Balance, Cost Basis").value;
    Then, once the 3rd field is carried over, I subtract it from the total of the previous 2 fields:
    event.value = this.getField("Total trust funds corpus").value - this.getField("Cost Basis, Total Investments").value;
    Here's the PDF in question, the calculations take place on page 10:  http://www.cfb.ca.gov/audits/2012ecfscf_report.pdf
    These calculations don't work when just the first number is carried over....so say I enter in 20 into the first line of Schedule A on page 5 - that number gets carried over to Schedule F on page 10 line #1 just fine, but it doesn't show in line 5 (Difference).  However, the calcuations work perfectly once the next number (from Schedule D, page 8) gets placed into line 2 on page 10.....

  • How do you display an item value based on other items?

    Item C's value depends on item A and B. If both A&B are null then C should display null , if A is null but B is not null then display 'Ok', everthing else display ' problem';
    3 items on page 5
    item A: name p5_A, display as text (saves state). source type is a dabase column
    item B: name P5_B, display as text (saves state). source type is a databbase column
    item C: name P5_C, display as text (based on PLsql doest not save state), source type pl/sql anonymous block ? like the following
    if :P5_A is null and :P5_B is null then :P5_C is null; else if :P5_A is null and :P5_B is not null then :P5_C := 'OK'; else :P5_C := 'Problem'; end if;
    Can someone tell me what did I do wrong on these stements unde apex? Thanks a bunch.
    Tai

    Alternatively, you could do a add a computation for that item - same source as mentioned in the previous reply, but each will work.
    Also, in your anonymous block, you have:
    if :P5_A is null and :P5_B is null then :P5_C is null; else if :P5_A is null and :P5_B is not null then :P5_C := 'OK'; else :P5_C := 'Problem'; end if;should probably be
    if :P5_A is null and :P5_B is null then :P5_C := null; elsif :P5_A is null and :P5_B is not null then :P5_C := 'OK'; else :P5_C := 'Problem'; end if;so instead of :P5_C is null , assign it a null - :P5_C := null. Also, else if in pl/sql is written as: elsif
    Edited by: tr3nton on Jan 19, 2010 3:03 PM

  • Derive one item value from 2 other supplied values

    I have a form that has 3 fields. One is a renewal_date (date) field, one is a maintenance_term (number - in months) field, and the third is an expiration_date (date) field which I would like to use the add_months functionality to derive this value based on the renewal and maintenance_term. What is the easiest way to accomplish this task?

    Hi,
    You need to add some javascript to your page and call this either in the onchange or onblur events of both items. The script should be something like:
    &lt;script type="text/javascript"&gt;
    function calc()
    var d = document.getElementById("P50_RENEWAL_DATE").value;
    var m = document.getElementById("P50_MAINT_TERM").value;
    if (d != '' && m != '')
       var t = document.getElementById("P50_MAINT_EXPIRY_DATE");
       var tmp = new Date(d);
       var tmp2 = new Date(tmp.getFullYear(), tmp.getMonth() + parseInt(m), tmp.getDate());
       var dd = tmp2.getDate();
       var mm = tmp2.getMonth() + 1;
       var yy = tmp2.getFullYear();
       var out = lpad(mm) + '/' + lpad(dd) + '/' + yy;
       t.value = out;
    function lpad(n)
    var s = "00" + n;
    var l = s.length;
    return s.substring(l - 2);
    &lt;/script&gt;Update your items and add the following in the HTML Form Element Attributes for each:
    onchange="javascript:calc();"or
    onblur="javascript:calc();"You'll have to see which version works for your page.
    Be warned that this javascript assumes that the date is entered in American date format (mm/dd/yyyy) - if it is in any other format, the function will not work.
    Andy

  • Application item value based on pl sql

    Hello Guys,
    I am pretty new to pl sql and have a basic question.
    I want to calculate the value of an app item (say p_X)using pl sql.
    Th logic is
    if( X1!=0)
    p_X = X1;
    else if (X2!=0)
    p_X=X2;
    and so on.
    Xi, X2 are app items.
    Please help .

    I would say jQuery would need to be involved.
    This may point you in the right direction
    Grassroots Oracle: Use jQuery to dynamically modify Region title

  • Apex 4.2  passing value from one item to other page

    I have a page where i accept a starting date and ending date as a parameter
    its source i set it as preference or application item
    Now in the other page I calls a jasper report..
    so it refers the first page.. I am not able to access the start_date which is in other page
    start_date and end_date
    Start_date shows as null
    Am confused over what is preference and application item
    Where will we use preference as a source type.
    Again example
    page 103
    p103_start_issue - preferenec
    p103_end_issue -- preference
    A buttons calls other page
    The other page
    when i call jasper report I Pass the parameter value as :p103_start_issue and :p103_end_issue
    But the actual value is null for those fields..
    How can i acess the actual value..
    Do i need to use application item. ? I tried application item as source type but still the same issue.
    Thanks

    Am confused over what is preference and application item
    Where will we use preference as a source type.A Page item is the most short-lived way to store variables in session state. Page items are routinely (although not always) cleared when entering or leaving a page. They are generally used to store a value that changes most times that you enter a page. Page items are also generally intended for use primarily by code on that page. This is not to say that other pages can not or will not use them, but access from other pages has to be controlled so that they are not trying to reference a page item from a different pages after the cache for that page has been cleared.
    Application items are for data that is longer-lived and/or is intended to be accessed by multiple pages. Application Items are not cleared unless a session end or a specific call to clear them is made.
    Preferences are for data that is intended to be stored and retrieved for specific users across multiple sessions. Log out of an app and back in and the data is still available.
    That said, from your description of the problem, I would guess that the cache on page 103 was cleared and the page item values erased. I suspect that you should be using an application item from what you have posted.

  • Set item value at other page via URL-redirect

    Hi, I have a button and I want to open a new window with it using an url-target.
    </br>
    </br>
    javascript:window.open ('f?p=&APP_ID.:143:&SESSION.::NO:143:P143_KDT_ID,P143_MESSAGE:&P140_KDT_ID.,&P140_MESSAGE.') </br>
    </br>
    When I use branching I get an error that there is no page to branch to. I don't understand why. As a workaround I use an url-redirect when the button is pressed, but I'm stuck on getting the current item value into the target page. I tried using $v('P140_MESSAGE') but I can't get the url valid.

    Jacob,
    The problem was that when the HTML for the button is rendered, the value of P1_ITEM from session state was "glued in" to the generated URL at that time. If you then entered a value for the iterm, even though your onChange AJAX technique changed the value in session state it was too late to change the already generated HTML for the button, specifically the URL target for the button.
    I created a Set Item2 button on your page with this for the URL attribute:
    javascript:window.open('f?p=&APP_ID.:2:&SESSION.::NO::P2_ITEM:' + document.getElementById('P1_ITEM').value);
    Let me know if that does what you need.
    There is another problem and I don't know the cause. When you click the button, it opens the new window properly but leaves the original page in an error state of some kind. I could not reproduce this in my application using the same js, so I'll be interested in how you solve that.
    Scott

Maybe you are looking for