Assigning Application Item

Hi,
I'm trying to set an Application level Item to hold a user's 'licence code' when they log into our website. This information is held in a cookie already set in the user's browser (for demo purposes I've called this 'EASY_COOKIE').
For development purposes, I have set the cookie - using third party freeware, I can confirm it is there - and have built a small test application to read this cookie and set an application item called 'USER_LICENCE_CODE'.
Now I've set a page process to run after the header loads, to set this item.
This is the PL/SQL block I've put in for the process:
declare
v varchar2(255) := null;
c owa_cookie.cookie;
begin
c := owa_cookie.get('EASY_COOKIE');
:USER_LICENCE_CODE := c.vals(1);
end;
The success message is returned OK, the page loads, but the application item 'USER_LICENCE_CODE' is still null.
Is there anything obviously wrong with my PL/SQL block?
Cheers for any assistance,
Scott

1. Ensure that the session where you check the application item's value is the same as the session used by the page that sets the value. Sometimes a login page will use one session ID and by the time authentication completes, you get a new session ID.
2. Ensure that the path associated with the cookie is the path to your apex application.
Scott

Similar Messages

  • 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

  • Assign Application item from PL/SQL package-not possible? Right?

    I have to be sure about tittle statement...
    If is possible please some lead where to look for that.
    THX!

    If I have in "Aplication items" item, in plsql is there any way to change it's value.
    FSP_SET_PREFERENCE is making some things for named user (AFAIK)...and I want to change some vars on session based ... but not in WEB but in PLSQL enviroment .
    Hope now is clear...
    THX for replies
    Message was edited by:
    Funky

  • Assigning Value To An Application Item via JS

    Hi guys,
    I am trying to assign a value to an application item by using javascript. But I can't do this when I try to display with alert the result is empty. Do you have any idea how can I assign value to an application item by using javascript?
    else if(action=="ASSIGN")
    var moname = $(el).children("td[headers='SOURCE']").text();
    $s('F10_SELECTED_OBJ',moname);
    alert($v('F10_SELECTED_OBJ'));
    Thanks

    Hi
    >
    I am trying to assign a value to an application item by using javascript. But I can't do this when I try to display with alert the result is empty. Do you have any idea how can I assign value to an application item by using javascript?
    >
    Scope of JavaScript is the HTML DOM in the browser. The Application Items do not exist in the HTML DOM, only in the session state.
    This explains what you observer. To set the App Items using JS you have to use an AJAX call to an OnDemand Application Process that sets the Application Item using PL/SQL. Or, call a procedure over http and set the App Item in that procedure after setting the Workspace / Security Group Id.
    Regards,

  • Assigning current value to Application Item

    Hi,
    I have a interactive report with form in my application.....
    if a user applys filter on first column of the interactive report.....how can i assign that value to the APPLICATION ITEM.
    thanks

    Hi Andy,
    Thanks....it is working perfect......
    but i have a small issue....
    in my real application i have 7tabs with page no's 1,2,3,4,5,6,and 15.....
    so i have created 7 application items G_PARTNO1, G_PARTNO2, G_PARTNO3, G_PARTNO4, G_PARTNO5, G_PARTNO6, G_PARTNO15.
    and used the single application process that runs On Load Before Header and uses the following PL/SQL code:
    DECLARE
    v1 NUMBER;
    v2 NUMBER;
    v3 NUMBER;
    v4 NUMBER;
    v5 NUMBER;
    v6 NUMBER;
    v15 NUMBER;
    BEGIN
    SELECT MIN(CONDITION_EXPRESSION) INTO v1
    FROM IR_CONDITIONS
    WHERE APPLICATION_ID = :APP_ID
    AND PAGE_ID = 1
    AND APPLICATION_USER = :APP_USER
    AND CONDITION_COLUMN_NAME = 'PART_NUMBER'
    AND CONDITION_ENABLED = 'Yes'
    AND SESSION_ID = :SESSION
    AND ROWNUM = 1;
    SELECT MIN(CONDITION_EXPRESSION) INTO v2
    FROM IR_CONDITIONS
    WHERE APPLICATION_ID = :APP_ID
    AND PAGE_ID = 2
    AND APPLICATION_USER = :APP_USER
    AND CONDITION_COLUMN_NAME = 'PART_NUMBER'
    AND CONDITION_ENABLED = 'Yes'
    AND SESSION_ID = :SESSION
    AND ROWNUM = 1;
    SELECT MIN(CONDITION_EXPRESSION) INTO v3
    FROM IR_CONDITIONS
    WHERE APPLICATION_ID = :APP_ID
    AND PAGE_ID = 3
    AND APPLICATION_USER = :APP_USER
    AND CONDITION_COLUMN_NAME = 'PART_NUMBER'
    AND CONDITION_ENABLED = 'Yes'
    AND SESSION_ID = :SESSION
    AND ROWNUM = 1;
    SELECT MIN(CONDITION_EXPRESSION) INTO v4
    FROM IR_CONDITIONS
    WHERE APPLICATION_ID = :APP_ID
    AND PAGE_ID = 4
    AND APPLICATION_USER = :APP_USER
    AND CONDITION_COLUMN_NAME = 'PART_NUMBER'
    AND CONDITION_ENABLED = 'Yes'
    AND SESSION_ID = :SESSION
    AND ROWNUM = 1;
    SELECT MIN(CONDITION_EXPRESSION) INTO v5
    FROM IR_CONDITIONS
    WHERE APPLICATION_ID = :APP_ID
    AND PAGE_ID = 5
    AND APPLICATION_USER = :APP_USER
    AND CONDITION_COLUMN_NAME = 'PART_NUMBER'
    AND CONDITION_ENABLED = 'Yes'
    AND SESSION_ID = :SESSION
    AND ROWNUM = 1;
    SELECT MIN(CONDITION_EXPRESSION) INTO v6
    FROM IR_CONDITIONS
    WHERE APPLICATION_ID = :APP_ID
    AND PAGE_ID = 6
    AND APPLICATION_USER = :APP_USER
    AND CONDITION_COLUMN_NAME = 'PART_NUMBER'
    AND CONDITION_ENABLED = 'Yes'
    AND SESSION_ID = :SESSION
    AND ROWNUM = 1;
    SELECT MIN(CONDITION_EXPRESSION) INTO v15
    FROM IR_CONDITIONS
    WHERE APPLICATION_ID = :APP_ID
    AND PAGE_ID = 15
    AND APPLICATION_USER = :APP_USER
    AND CONDITION_COLUMN_NAME = 'PART_NUMBER'
    AND CONDITION_ENABLED = 'Yes'
    AND SESSION_ID = :SESSION
    AND ROWNUM = 1;
    IF (:G_PARTNO1 IS NULL AND v1 IS NOT NULL) OR (:G_PARTNO1 <> v1) THEN
    APEX_UTIL.IR_RESET(2);
    APEX_UTIL.IR_FILTER(2, 'PART_NUMBER', 'EQ', v1);
    APEX_UTIL.IR_RESET(3);
    APEX_UTIL.IR_FILTER(3, 'PART_NUMBER', 'EQ', v1);
    APEX_UTIL.IR_RESET(4);
    APEX_UTIL.IR_FILTER(4, 'PART_NUMBER', 'EQ', v1);
    APEX_UTIL.IR_RESET(5);
    APEX_UTIL.IR_FILTER(5, 'PART_NUMBER', 'EQ', v1);
    APEX_UTIL.IR_RESET(6);
    APEX_UTIL.IR_FILTER(6, 'PART_NUMBER', 'EQ', v1);
    APEX_UTIL.IR_RESET(15);
    APEX_UTIL.IR_FILTER(15, 'PART_NUMBER', 'EQ', v1);
    :G_PARTNO1 := v1;
    :G_PARTNO2 := v1;
    :G_PARTNO3 := v1;
    :G_PARTNO4 := v1;
    :G_PARTNO5 := v1;
    :G_PARTNO6 := v1;
    :G_PARTN015 := v1;
    ELSIF :G_PARTNO1 IS NOT NULL AND v1 IS NULL THEN
    APEX_UTIL.IR_RESET(2);
    APEX_UTIL.IR_RESET(3);
    APEX_UTIL.IR_RESET(4);
    APEX_UTIL.IR_RESET(5);
    APEX_UTIL.IR_RESET(6);
    APEX_UTIL.IR_RESET(15);
    :G_PARTNO1 := NULL;
    :G_PARTNO2 := NULL;
    :G_PARTNO3 := NULL;
    :G_PARTNO4 := NULL;
    :G_PARTNO5 := NULL;
    :G_PARTNO6 := NULL;
    :G_PARTN015 := NULL;
    ELSIF (:G_PARTNO2 IS NULL AND v2 IS NOT NULL) OR (:G_PARTNO2 <> v2) THEN
    APEX_UTIL.IR_RESET(1);
    APEX_UTIL.IR_FILTER(1, 'PART_NUMBER', 'EQ', v2);
    APEX_UTIL.IR_RESET(3);
    APEX_UTIL.IR_FILTER(3, 'PART_NUMBER', 'EQ', v2);
    APEX_UTIL.IR_RESET(4);
    APEX_UTIL.IR_FILTER(4, 'PART_NUMBER', 'EQ', v2);
    APEX_UTIL.IR_RESET(5);
    APEX_UTIL.IR_FILTER(5, 'PART_NUMBER', 'EQ', v2);
    APEX_UTIL.IR_RESET(6);
    APEX_UTIL.IR_FILTER(6, 'PART_NUMBER', 'EQ', v2);
    APEX_UTIL.IR_RESET(15);
    APEX_UTIL.IR_FILTER(15, 'PART_NUMBER', 'EQ', v2);
    :G_PARTNO1 := v2;
    :G_PARTNO2 := v2;
    :G_PARTNO3 := v2;
    :G_PARTNO4 := v2;
    :G_PARTNO5 := v2;
    :G_PARTNO6 := v2;
    :G_PARTN015 := v2;
    ELSIF :G_PARTNO2 IS NOT NULL AND v2 IS NULL THEN
    APEX_UTIL.IR_RESET(1);
    APEX_UTIL.IR_RESET(3);
    APEX_UTIL.IR_RESET(4);
    APEX_UTIL.IR_RESET(5);
    APEX_UTIL.IR_RESET(6);
    APEX_UTIL.IR_RESET(15);
    :G_PARTNO1 := NULL;
    :G_PARTNO2 := NULL;
    :G_PARTNO3 := NULL;
    :G_PARTNO4 := NULL;
    :G_PARTNO5 := NULL;
    :G_PARTNO6 := NULL;
    :G_PARTN015 := NULL;
    ELSIF (:G_PARTNO3 IS NULL AND v3 IS NOT NULL) OR (:G_PARTNO3 <> v3) THEN
    APEX_UTIL.IR_RESET(1);
    APEX_UTIL.IR_FILTER(1, 'PART_NUMBER', 'EQ', v3);
    APEX_UTIL.IR_RESET(2);
    APEX_UTIL.IR_FILTER(2, 'PART_NUMBER', 'EQ', v3);
    APEX_UTIL.IR_RESET(4);
    APEX_UTIL.IR_FILTER(4, 'PART_NUMBER', 'EQ', v3);
    APEX_UTIL.IR_RESET(5);
    APEX_UTIL.IR_FILTER(5, 'PART_NUMBER', 'EQ', v3);
    APEX_UTIL.IR_RESET(6);
    APEX_UTIL.IR_FILTER(6, 'PART_NUMBER', 'EQ', v3);
    APEX_UTIL.IR_RESET(15);
    APEX_UTIL.IR_FILTER(15, 'PART_NUMBER', 'EQ', v3);
    :G_PARTNO1 := v3;
    :G_PARTNO2 := v3;
    :G_PARTNO3 := v3;
    :G_PARTNO4 := v3;
    :G_PARTNO5 := v3;
    :G_PARTNO6 := v3;
    :G_PARTN015 := v3;
    ELSIF :G_PARTNO3 IS NOT NULL AND v3 IS NULL THEN
    APEX_UTIL.IR_RESET(1);
    APEX_UTIL.IR_RESET(2);
    APEX_UTIL.IR_RESET(4);
    APEX_UTIL.IR_RESET(5);
    APEX_UTIL.IR_RESET(6);
    APEX_UTIL.IR_RESET(15);
    :G_PARTNO1 := NULL;
    :G_PARTNO2 := NULL;
    :G_PARTNO3 := NULL;
    :G_PARTNO4 := NULL;
    :G_PARTNO5 := NULL;
    :G_PARTNO6 := NULL;
    :G_PARTN015 := NULL;
    ELSIF (:G_PARTNO4 IS NULL AND v4 IS NOT NULL) OR (:G_PARTNO4 <> v4) THEN
    APEX_UTIL.IR_RESET(1);
    APEX_UTIL.IR_FILTER(1, 'PART_NUMBER', 'EQ', v4);
    APEX_UTIL.IR_RESET(2);
    APEX_UTIL.IR_FILTER(2, 'PART_NUMBER', 'EQ', v4);
    APEX_UTIL.IR_RESET(3);
    APEX_UTIL.IR_FILTER(3, 'PART_NUMBER', 'EQ', v4);
    APEX_UTIL.IR_RESET(5);
    APEX_UTIL.IR_FILTER(5, 'PART_NUMBER', 'EQ', v4);
    APEX_UTIL.IR_RESET(6);
    APEX_UTIL.IR_FILTER(6, 'PART_NUMBER', 'EQ', v4);
    APEX_UTIL.IR_RESET(15);
    APEX_UTIL.IR_FILTER(15, 'PART_NUMBER', 'EQ', v4);
    :G_PARTNO1 := v4;
    :G_PARTNO2 := v4;
    :G_PARTNO3 := v4;
    :G_PARTNO4 := v4;
    :G_PARTNO5 := v4;
    :G_PARTNO6 := v4;
    :G_PARTN015 := v4;
    ELSIF :G_PARTNO4 IS NOT NULL AND v4 IS NULL THEN
    APEX_UTIL.IR_RESET(1);
    APEX_UTIL.IR_RESET(2);
    APEX_UTIL.IR_RESET(3);
    APEX_UTIL.IR_RESET(5);
    APEX_UTIL.IR_RESET(6);
    APEX_UTIL.IR_RESET(15);
    :G_PARTNO1 := NULL;
    :G_PARTNO2 := NULL;
    :G_PARTNO3 := NULL;
    :G_PARTNO4 := NULL;
    :G_PARTNO5 := NULL;
    :G_PARTNO6 := NULL;
    :G_PARTN015 := NULL;
    ELSIF (:G_PARTNO5 IS NULL AND v5 IS NOT NULL) OR (:G_PARTNO5 <> v5) THEN
    APEX_UTIL.IR_RESET(1);
    APEX_UTIL.IR_FILTER(1, 'PART_NUMBER', 'EQ', v5);
    APEX_UTIL.IR_RESET(2);
    APEX_UTIL.IR_FILTER(2, 'PART_NUMBER', 'EQ', v5);
    APEX_UTIL.IR_RESET(3);
    APEX_UTIL.IR_FILTER(3, 'PART_NUMBER', 'EQ', v5);
    APEX_UTIL.IR_RESET(4);
    APEX_UTIL.IR_FILTER(4, 'PART_NUMBER', 'EQ', v5);
    APEX_UTIL.IR_RESET(6);
    APEX_UTIL.IR_FILTER(6, 'PART_NUMBER', 'EQ', v5);
    APEX_UTIL.IR_RESET(15);
    APEX_UTIL.IR_FILTER(15, 'PART_NUMBER', 'EQ', v5);
    :G_PARTNO1 := v5;
    :G_PARTNO2 := v5;
    :G_PARTNO3 := v5;
    :G_PARTNO4 := v5;
    :G_PARTNO5 := v5;
    :G_PARTNO6 := v5;
    :G_PARTN015 := v5;
    ELSIF :G_PARTNO5 IS NOT NULL AND v5 IS NULL THEN
    APEX_UTIL.IR_RESET(1);
    APEX_UTIL.IR_RESET(2);
    APEX_UTIL.IR_RESET(3);
    APEX_UTIL.IR_RESET(4);
    APEX_UTIL.IR_RESET(6);
    APEX_UTIL.IR_RESET(15);
    :G_PARTNO1 := NULL;
    :G_PARTNO2 := NULL;
    :G_PARTNO3 := NULL;
    :G_PARTNO4 := NULL;
    :G_PARTNO5 := NULL;
    :G_PARTNO6 := NULL;
    :G_PARTN015 := NULL;
    ELSIF (:G_PARTNO6 IS NULL AND v6 IS NOT NULL) OR (:G_PARTNO6 <> v6) THEN
    APEX_UTIL.IR_RESET(1);
    APEX_UTIL.IR_FILTER(1, 'PART_NUMBER', 'EQ', v6);
    APEX_UTIL.IR_RESET(2);
    APEX_UTIL.IR_FILTER(2, 'PART_NUMBER', 'EQ', v6);
    APEX_UTIL.IR_RESET(3);
    APEX_UTIL.IR_FILTER(3, 'PART_NUMBER', 'EQ', v6);
    APEX_UTIL.IR_RESET(5);
    APEX_UTIL.IR_FILTER(5, 'PART_NUMBER', 'EQ', v6);
    APEX_UTIL.IR_RESET(4);
    APEX_UTIL.IR_FILTER(4, 'PART_NUMBER', 'EQ', v6);
    APEX_UTIL.IR_RESET(15);
    APEX_UTIL.IR_FILTER(15, 'PART_NUMBER', 'EQ', v6);
    :G_PARTNO1 := v6;
    :G_PARTNO2 := v6;
    :G_PARTNO3 := v6;
    :G_PARTNO4 := v6;
    :G_PARTNO5 := v6;
    :G_PARTNO6 := v6;
    :G_PARTN015 := v6;
    ELSIF :G_PARTNO6 IS NOT NULL AND v6 IS NULL THEN
    APEX_UTIL.IR_RESET(1);
    APEX_UTIL.IR_RESET(2);
    APEX_UTIL.IR_RESET(3);
    APEX_UTIL.IR_RESET(5);
    APEX_UTIL.IR_RESET(4);
    APEX_UTIL.IR_RESET(15);
    :G_PARTNO1 := NULL;
    :G_PARTNO2 := NULL;
    :G_PARTNO3 := NULL;
    :G_PARTNO4 := NULL;
    :G_PARTNO5 := NULL;
    :G_PARTNO6 := NULL;
    :G_PARTN015 := NULL;
    ELSIF (:G_PARTNO15 IS NULL AND v15 IS NOT NULL) OR (:G_PARTNO15 <> v15) THEN
    APEX_UTIL.IR_RESET(1);
    APEX_UTIL.IR_FILTER(1, 'PART_NUMBER', 'EQ', v15);
    APEX_UTIL.IR_RESET(2);
    APEX_UTIL.IR_FILTER(2, 'PART_NUMBER', 'EQ', v15);
    APEX_UTIL.IR_RESET(3);
    APEX_UTIL.IR_FILTER(3, 'PART_NUMBER', 'EQ', v15);
    APEX_UTIL.IR_RESET(5);
    APEX_UTIL.IR_FILTER(5, 'PART_NUMBER', 'EQ', v15);
    APEX_UTIL.IR_RESET(6);
    APEX_UTIL.IR_FILTER(6, 'PART_NUMBER', 'EQ', v15);
    APEX_UTIL.IR_RESET(4);
    APEX_UTIL.IR_FILTER(4, 'PART_NUMBER', 'EQ', v15);
    :G_PARTNO1 := v15;
    :G_PARTNO2 := v15;
    :G_PARTNO3 := v15;
    :G_PARTNO4 := v15;
    :G_PARTNO5 := v15;
    :G_PARTNO6 := v15;
    :G_PARTN015 := v15;
    ELSIF :G_PARTNO15 IS NOT NULL AND v15 IS NULL THEN
    APEX_UTIL.IR_RESET(1);
    APEX_UTIL.IR_RESET(2);
    APEX_UTIL.IR_RESET(3);
    APEX_UTIL.IR_RESET(5);
    APEX_UTIL.IR_RESET(6);
    APEX_UTIL.IR_RESET(4);
    :G_PARTNO1 := NULL;
    :G_PARTNO2 := NULL;
    :G_PARTNO3 := NULL;
    :G_PARTNO4 := NULL;
    :G_PARTNO5 := NULL;
    :G_PARTNO6 := NULL;
    :G_PARTN015 := NULL;
    END IF;
    END;
    The process is conditional on "Current Page is Contained Within Expression 1 (comma delimited list of pages) and Expression 1 is: 1:2:3:4:5:6:15
    I am getting the following error when i run the application:
    Unexpected error, unable to find item name at application or page level.
    Error ERR-1002 Unable to find item ID for item "G_PARTN015" in application "181".
    OK
    Please let me know where i am doing wrong....
    Thanks

  • Assign values for Application items

    Hi,
    I have some application items to which I want to assign values querying from a database table based on the user logged in. I have created an application process which does that. What process point I need to select so that the values in application items are available through out the session?
    Thanks,
    Asha

    Asha:
    I have been able to reproduce this issue. The application process appears to fire for every 'new' session-id. This explains the 'no data found' when you navigate to the application's login page. What is weirder is that APEX re-uses the session-id created when presenting the login page and therefore the application process no longer fires ! This needs more research. Clearly, my understanding of the the 'On New Session - After Authentication' is inadequate.
    In the meanwhile you can move the code you have for the application process and and use it as a 'Post-Authentication Process' for the application's authentication scheme.
    Varad

  • Application Item Not Working as Bind Variable in Region Source

    I've created an application variable - APP_AC_CODE - a value for which - PA1 - I set as part of the column link on page A that branches to page B.
    I use APP_AC_CODE as part of a region title on page B - &APP_AC_CODE. Parameters - which evaluates successfully to 'PA1 Parameters'.
    However when I try to use APP_AC_CODE on the same page as part of the SQL query that drives the report for that region it fails to retrieve any records.
    If I set the region source to:
    SELECT idi FROM v_parameters WHERE aircraft_code = :APP_AC_CODE ;
    then it fails but if I explicitly state the where clause:
    SELECT idi FROM v_parameters WHERE aircraft_code = 'PA1' ;
    then it works just fine and retrieves the records as expected.
    If I check the session state then the right value is assigned to APP_AC_CODE; if I check debug then it shows the right value - binding: ":APP_AC_CODE"="APP_AC_CODE" value="PA1". Also, it displays fine as a substitution string.
    I'm very confused. I'll be very grateful if someone can shed a little light. I expect I'm doing something stupid - new user and all that - but I haven't got a clue what that is.

    Thanks for the reply Scott, but unfortunately I can't upload the app for business reasons. I appreciate that might make it impossible for you to diagnose the problem.
    I don't know if I'm making progress with the problem but I've tried adding a hidden page item, setting that value from page A and using it from page B with the same results. Check the session state, the debug messages, or use it as a substitution variable and the right value is there.
    I then tried setting the value of the page item with the value of the application item and (according to session and debug) the right value ends up in the page item. Still didn't work though.
    I then created a new page (using the sql report wizard in case I was doing something wrong manually) and tried using the application item in the same way with the same problem.
    Given that no records are being returned I assume that the database server doesn't care for the SQL query it sees. Is there a way of seeing what this is? When I look at the debug messages, all I see is 'parse query' and 'binding' messages. Any way I can see what the database server eventually sees?
    Matt

  • Is there a maximum size for an Application Item?

    I have a pl/sql procedure which inserts some records and has an out variable to return a warning message that I want to append to the normal Success message field in the Processes. Unfortunately I found out that if I defined a hidden variable and used the &P1_SUCCESS_MSG. syntax it would strip HTML. Meaning all the break tags get interpreted literally in the success message. I did some searching and read Scott's recommendation to use an Application Item and that worked like a charm....
    Until today when I kept getting a message that an HTTP 404 error that the wwv_flow.accept page can't be found. I systematically took out each process on the page (about 5 of them) and finally realized it only threw the error when a really long string was passed. Long meaning about 3000 characters (2919 to be precise)- I know because I inserted into my debug table once I knew that was the issue.
    Does anyone know a reason why this would occur? And maybe how to avoid it?
    The string is nothing fany its just a bunch of:
    ** Warning: So and So has been assigned to project ABC for x hours in Period y and is overallocated by z hours ** </br>A validation won't work because its not an error, just an informative message to the user. I don't want to stop submission if I hit the condition. TIA!!

    Scott,
    Thanks for your help.
    I think what you'll need to do is set the message text into an application item using an assignment statement in a page process or in a computation. Then leave the success message for the process null. Then branch to the page and have the page display the message (from the item) wherever you like on the page.
    Scott

  • How to set the value of application item using pl/sql in application process

    Hi guys,
    I want a global variable (application item) whose value will be set at the start when a user logs in to the application. The value will be retrieved from database using a sql query. I do not know the exact syntax to set the value of application item in application process. Also i want to know in which type of application process should i use to set the value of application item when a user starts a session. The value of application item varies from user to user.
    Please help.
    I am using apex 4.2
    Regards,
    Waqas

    You can use the application item as bind-variable with its name. ie. your application item is named G_MY_APPLICATION_ITEM, then you can access/set it using :G_MY_APPLICATION_ITEM.
    For example
    BEGIN
        -- assign like a variable
        :G_MY_APPLICATION_ITEM := 'LARRY';
        -- use in a SQL statement
        SELECT WHATEVER_COLUMN
          INTO :G_MY_APPLICATION_ITEM
          FROM MY_TABLE
         WHERE USERNAME = :APP_USER
    END;
    Peter

  • 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

  • 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.

  • Passing values thru application Item.

    All,
    Ive issue here with Apex4.1.x.
    I created an application item to which a value is set using javascript like (document.getElementById('P135_GLOBAL1').value = '100'; ) executed onclick when a LIST ITEM is clicked to display another page/page2. On the called page2 i want its region title set to ="Something&135_GLOBAL1." and same application item value i want to assign to another hidden item in the called page/page2......any idea is appreciated.

    koloo wrote:
    All,
    Ive issue here with Apex4.1.x.
    I created an application item to which a value is set using javascript like (document.getElementById('P135_GLOBAL1').value = '100'; ) executed onclick when a LIST ITEM is clicked to display another page/page2. Application item values cannot be set in this way: they only exist in session state on the server, not as HTML elements in the page that can be manipulated using JavaScript DOM methods/properties in the browser. (Furthermore, when setting page items in this way, always use the built-in APEX method<tt>$s</tt> APEX method to set values in JavaScript as this contains logic to correctly process APEX item types.)
    To set the value of application items in JavaScript, use a Dynamic Action with a Set Value action, triggered by a Change event on your list item.

  • Are Application Items Bound Items

    I am trying to build a collection with a Before Header page process. Then I use that collection to build a report.
    One of the parameters is that some fieldx is between some dateA and some dateB. I would like to use the values of two application items, say Fxxx_StartDate and Fxx_EndDate as the date parameters in the query. When I do use the application items, I get
    ORA-20104: create_collection_from_query_b Error:ORA-20104: create_collection_from_query ExecErr:ORA-01008: not all variables bound
    when the page tries to display.
    If I use sysdate - 30 and sysdate as the date parameters the collection builds just fine and the page displays as it should.
    I guess my question is what is a bound variable and is there something I can do to make some variable 'bound'?

    I'm not entirely sure of the answer to the question "are application items bound items?". In the sense that page items can be bound to specific columns of a specific table that are used for built-in 'FETCH' and 'PROCESS' handling, I would say no. They're not bound in that sense.
    Application items only get values via a specific assignment action - which you need to write and place in the appropriate place for your situation.
    As always, just my 2 cents.
    Earl

  • What is the main differencebetween "Application Items" and "Page0 items"

    ... i do not see the real difference...
    App items can be assigned on new session...so are assigmenet place only difference or I'm missing missing something bigger ... ?
    Could anyone tell me what?
    THX!

    Hello,
    As I see it –
    All page 0 items, including the hidden ones, will be rendered, by default, on every page. That will allow you to access them using JavaScript and DOM.
    Application items will always be there for you, but on the level of the ApEx engine. They will not be rendered on the page, so you can't access them using JavaScript.
    Regards,
    Arie.

  • Problem with application item and session state

    Okay, let's see if I can explain this problem coherently.
    I have a small app (one page), with an application item, F_WHERE_CLAUSE.
    This page has three regions in which there are items that the users can populate for search conditions. A couple of these items are "select list with submit" (I still need to upgrade to the AJAX method, I know). There is another region which has one hidden field, called P1_WHERE_CLAUSE. This field is defined to "Always, replacing any value in session state..." with source type of "Item (application or page.....", and a source value of F_WHERE_CLAUSE with no default value.
    I have a button called "Search" which submits the page and fires a PL/SQL process which builds a where condition based upon the other page items and stores the value to the application item F_WHERE_CLAUSE (correctly).
    For testing, I've made the P1_WHERE_CLAUSE field visible so that I can see what's going on. I've also clicked the debug and session buttons to help trace this. After I click the "Search" button and the page submits, debug shows:
    0.02: ...Session State: Save "P1_WHERE_CLAUSE" - saving same value: "1=1"
    followed later by:
    0.05: ...Session State: Saved Item "F_WHERE_CLAUSE" New Value="lower(primary_class) = 'rock' and country = 'Spain'"
    The field P1_WHERE_CLAUSE displays with the correct search criteria as signified by F_WHERE_CLAUSE above. However, If I click the "session" button to view the session state values, P1_WHERE_CLAUSE shows up as:
    P1_WHERE_CLAUSE Textarea    1=1    U while F_WHERE_CLAUSE displays the correct value still.
    The reason this "problem" came up, is that this page also has three SQL report regions which use &P1_WHERE_CLAUSE. for the where condition. While they display the correct results on-screen, each report region also has the "Export to csv" enabled, and the export seems to be using the "1=1" condition (from the "session" window) instead of the search criteria that the on-screen region is using (F_WHERE_CLAUSE and the displayed P1_WHERE_CLAUSE), resulting in a retreival of all records.
    Anybody have any idea what's going on and why, and how to get the csv export to use the correct value for the where condition?
    Thanks,
    Bill Ferguson

    It appears the "Export to CSV" functionality requires the item value to be set in session state. The P1_WHERE_CLAUSE item value never gets saved to session state. The page is rendered and the value is put in the item on the page but until you submit the page session state doesn't know what P1_WHERE_CLAUSE is.
    Create a before header computation or process to set the value of P1_WHERE_CLAUSE (which will save it to session state). It is interesting that the report regions didn't need to look at the value in session state but the "export to csv" does.
    --Jeff                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Maybe you are looking for

  • Why ' ?xml version="1.0" encoding="UTF-8"? ' is not appearing in XML ( 9.2)

    Hi, I am using following SQL query to generate output from XML select XMLTYPE ('<?xml version="1.0" encoding="UTF-8"?>'|| xmlelement("bank", XMLATTRIBUTES('http://www.w3.org/2001/XMLSchema' AS "xmlns:xsi", 'http://www.XXXX.xsd' AS "xsi:nonamespaceSch

  • Email in SAPSCRIPT

    Hi everybody, IS healthcare intensively uses SAPSCRIPT as output variant for PMD ("Parametrierte Medizinische Dokumente"). When viewing the document, its output is processed by SAPSCRIPT and displayed as PDF. Now we want to embed an Email-Link into t

  • Does querybuilder support non-english character?

    I want to make query using querybuilder with non-english character (Chinese)? I tried with http://localhost:4502/libs/cq/search/content/querydebug.html but it is not working. below is my query string: property=contenttext property.value=你好嗎 I have co

  • PC suite not detecting phone

    Hi, I have updated the firmware on my N80, but now PC suite cannot detect the phone, however, I can connect to the internet even if the phone is not detected. I installed the updated PC suite, uninstalled it, and reverted to the older version, nothin

  • How to calibrate my monitor, correctly?

    I never feel like the colors look quite right on my monitor . How can i make sure im getting the best picture .