Using value of application item in javascript

Hello All,
Apex 3.1
I have a javascript that calls an application process, please see below. In the application process I have logic to set/change the value of an application item. Later in the javascript I need to set a page item to the value of the application item which was set in the application process. Any alerts that I post during the javascript show this value as blank, even though a similar HTP.prn in the application process displays the value!. After the script completes the correct value of the application item is in session state . Can someone explain this timing issue to me? Why can't I get the value of an application item in the javascript when the application process is called from the javascript?
Is there a simple workaround here for me to get this value?
<script>
function f_ValidateLinkLine(pThis) {
   // The row in the table
   var vRow = pThis.id.substr(pThis.id.indexOf('_')+1);
   // is Link Line really a number? 
   if ( isNaN(html_GetElement('f20_'+vRow).value)) {
        if (html_GetElement('f20_'+vRow).value.length > 0) {
        alert('Link Line is an invalid number - '+html_GetElement('f20_'+vRow).value);
        html_GetElement('f20_'+vRow).value = '';
   } else { 
       if ( ! isNaN( parseFloat(html_GetElement('f20_'+vRow).value) ) ) {
   var link_line = parseInt(html_GetElement('f20_'+vRow).value);
   if (html_GetElement('f20_'+vRow).value.length > 0) {
      var get = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=ValidateLinkLine',0);
      get.add('F101_LINK_LINE',html_GetElement('f20_'+vRow).value);
      get.add('F101_INVENTORY_ITEM_ID',html_GetElement('inventory_item_id_'+Number(link_line)).value);
      get.add('F101_QUOTE_LINE_LINK_ID',html_GetElement('f01_'+spacer+link_line).value);
      get.add('F101_QUOTE_LINE_ID',html_GetElement('f01_'+vRow).value);
      get.add('F101_QUOTE_NUMBER',html_GetElement('f19_'+vRow).value);
      gReturn = get.get();
   // The application process can sometimes change the value of F101_QUOTE_LINE_ID
  //  and I need to set f37 to this value when this happens
    html_GetElement('f37_'+vRow).value =('&F101_QUOTE_LINE_ID.');  //< -- This does not work, the applicaiton item is blank!
      if (gReturn) {
       alert(gReturn);
      if(gReturn) {
       html_GetElement('f20_'+vRow).value = '';
       html_GetElement('f37_'+vRow).value = '';
   }  //End Check Length
  } else {
  html_GetElement('f37_'+vRow).value = '';
  } // is Link Line a number?   
} // End If  
} // End ValidateLinkLine
</script>Edited by: blue72TA on Aug 16, 2011 11:39 AM
Edited by: blue72TA on Aug 16, 2011 11:41 AM
Edited by: blue72TA on Aug 16, 2011 11:41 AM

Hi,
When you use application item in JavaScript like you do, string &F101_QUOTE_LINE_ID. is substituted by item value from session state.
Changes to that item value when you call On Demand process do not affect to page.
Lets take example,
You app item F101_QUOTE_LINE_ID value is e.g. XX in session state.
You run page and see page source it looks like this
html_GetElement('f37_'+vRow).value =('XX');Kind you have hard code value to JavaScript.
Nothing will change that unless you refresh page.
You need return value from On Demand process.
To set value code could look like then
html_GetElement('f37_'+vRow).value = gReturn;Regards,
Jari

Similar Messages

  • How to access the value of application item in javascript

    How to access the value of application item in javascript?

    Hi,
    One way
    var myVariable = '&MY_APP_ITEM.';Br,Jari

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

  • 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

  • How to set value of application item using Java script.

    I have created a textbox on page 0, on chnage of textbox i want to set the value of application item.
    How to write the code to set & get value of application item.
    Thanks,
    -Amit

    Hello Amit
    This would be a great place to start...
    JavaScript
    Alternatively, APEX 4.0 will make this sort of task declarative.
    Kind regards
    Simon Gadd

  • Set application item from javascript?

    Hi!
    Is it possible to set an APPLICATION ITEM from javascript? If so can some one please point me to the thread, or a FAQ or an example, etc?
    Thanks!
    Dave Venus

    dvenus1,
    Sure. In the script below I check variables and populate based on what I find...
    <script language="JavaScript" type="text/javascript">
    function Populate_fld()
    var formVehicle = document.getElementById('P9_HIDE_VEHICLE').value;
    var formState = document.getElementById('P9_HIDE_STATE').value;
    var formTag = document.getElementById('P9_HIDE_TAG').value;
    var formName = document.getElementById('P9_HIDE_NAME').value;
    document.getElementById("P9_VEHICLE").value = formVehicle;
    document.getElementById("P9_TAG").value = formTag;
    document.getElementById("P9_STATE").value = formState;
    document.getElementById("P9_VISITOR_NAME").value = formName;
    if (formState = " ")
    document.getElementById("P9_STATE").value = "FL";
    </script>
    Keep Smiling,
    Bob R

  • 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

  • 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

  • Setting application items through javascript

    Is there any way to modify application items using javascript? I would work with page items, but I need something that is guaranteed to be in the session state.

    Oh yes, I know that. Well here's the exact problem (I've posted threads on it from a couple different angles previously):
    - I am trying to open a popup with a report region such that I can send a query to the popup some how, without doing a page submission of the parent page.
    - The current method I am using is to send the query by URL, but I'm reaching the limit of URL length, and it's not a particularly secure solution.
    - My latest idea was to pass-by-reference (what this thread is about), but this presented a couple of problems.
    1) I could set a parent page item dynamically by JS, but the only way I know of loading the information automatically in the popup is using onLoad -- but that's too late.
    2) I could use session state, but I risk Region condition: javascript is enabled?, page session items are not set until a page is submitted, and application session items are not accessible by JS.
    I was thinking that maybe there is some way of accessing browser session state with JS, but I guess not....

  • Passing sql report query field value to hidden item in javascript

    I have sql report which has in each row one html button. Let us say that query SHOULD look like (two columns, to be easy to get the point):
    select 1 SECURITY_ID
      , '<input type="BUTTON" value="Top10" onClick="javascript:Top10Click ('||SECURITY_ID||');" >' BTN
    FROM DUAL;
    function Top10Click (vValue) {
      html_GetElement('P31_PROCESS_VALUE').value = vValue;
      doSubmit('GO_BACK');
    } <br><br>
    where P31_PROCESS_VALUE is hidden item where i want to store value of row where click happened.
    <br><br>
    In every button i want to pass row value "SECURITY_ID" to Top10Click function for each row differently.
    <br><br>
    Problem is that when I place double qoute then js is not working, else js is ok but "SECURITY_ID" is passed as constant not as live SQL value.
    <br><br>
    Any help...THX!
    <br>
    Demo is on oracle:
    http://htmldb.oracle.com/pls/otn/f?p=26216:1
    Workspace entry:
    WK: FUNKY
    UN: [email protected]
    PW: qwertz

    I have tried to unify the solution, so it looks like:
    select 1 SECURITY_ID
      , '<input type="BUTTON" value="Top10" onClick="javascript:Top10Click ('||'&quot_X;'||SECURITY_ID||'&quot_X;'||');"  >' BTN
    FROM DUAL;change '&quot_X;' (remove "_X" part ... so it can be seen in HTML properly!
    THX Denes for great ideas...

  • Using value of selected item list

    I'm working on existing code. I want to use the value of a selected item in a list to use it in a query. So, the corresponding records should be displayed in a subform when an item of the list is selected. This is the code i'm using:
    This is the code i use to populate the list
    DECLARE
    locatienaam varchar(100);
    locid number;
    recordcount number;
    i number;
    correct NUMBER;
    hList ITEM := Find_Item('LIST_LOCATIE');
    iRC PLS_INTEGER := 0;
    currValue VARCHAR2(60); /* increase if required*/
    BEGIN
    --vraag het bijhorende ID op van de geselecteerde locatie.
    currValue := Name_In('LIST_LOCATIE');
    FOR i IN 1..Get_List_Element_Count(hList) LOOP
    IF currValue = Get_List_Element_Value(hList,i) THEN
    iRC := i;
    break;
    END IF;
    END LOOP;
    locid := GET_LIST_ELEMENT_VALUE('LIST_LOCATIE', iRC);
    locatienaam := GET_LIST_ELEMENT_LABEL('LIST_LOCATIE', iRC);
    Below the code i use to make the query
    SET_BLOCK_PROPERTY('V_KALENDER',DEFAULT_WHERE,'(BEGINDATUM BETWEEN '||''''||:V_KALENDER.TIJDSTIP1 ||'''AND '||''''||:V_KALENDER.TIJDSTIP2||''') AND (NAAM=:locatienaam)');
    GO_BLOCK('V_KALENDER');
    Execute_Query;
    I get the message: "unable to resolve reference to locatienaam"
    The subform is populated with all the records between the two dates of all the locations, not only by the selected location.

    Hi,
    Welcome to the forum!
    If locatienaam is a local variable, don't use a colon (:) to reference it.
    You didn't say
    IF :currValue = Get_List_Element_Value(:hList,:i) THEN so why should you say
    :locatienaam?

  • FMS using values in row items of form

    Hi Experts,
    I have a situation where i provide a list of values to the user using a format search to get the required serial number. the format search appears in the following manner
    Find |_<text to be found>___|
    <Search Results from the query>
    *Manufac, Serial
    Serial Number
    Batch ID*
    AAAA1
    BBBB1
    CCC/1
    Now in my form i need to enter all three data items listed in my format search but when i select the entire row from my FMS I only get the value to the row item that i defined the FMS. Can any one let me know if there is a way to get the relevant values filled to the relevant columns. i don't want to define the same FMS to three columns.
    One way that i found is to use the following command in the manufacturer Serial and Batch ID columns and set the format search to refresh every time the serial number changes  --- but it didn't work -
    or i did it wrong --- please help
    SELECT T0.[SuppSerial] AS 'Manufacturer Serial No.' FROM  [dbo].[OSRI] T0 WHERE T0.IntrSerial = '$http://$21.54.1'
    21 = formID, 54 = Column , 1 = row.

    The basic steps would be something like this:
    1. Put the FMS that gets the Manufacturer Serial No. into the first column. Its variable comes from $[21.54.1] or a user choice or something?
    2. Put the FMS that gets the Serial Number into the second column. Its variable is the value in the first column, and it refreshes when that value changes.
    2. Put the FMS that gets the Batch Number into the third column. Its variable is the value in the second column, and it refreshes when that value changes.
    After that I would need to see the FMS's that you tried.

  • Set default value for listbox items - Acrobat Javascript

    Hello,
    I am trying to set the default value for a listbox where multiple items are selected.
    If a single item is selected then this.getField("zzz").defaultValue = x; works fine, but you cannot use defaultValue for multiple indicies. The manual mentions the user or export events but I cannot see how that would work.
    Any help will be appreciated.
    Andrew

    I hope somebody can provide help with this as I'm having a similar problem.
    http://www.directorygump.com

  • How to read application item's value using  javascript

    Is there any way to read value of application item using javascript?
    Thanks

    Javascript can access the objects rendered for the page you are calling. This is why the $v function will do the work if calling it for a page item. However an application item isn't rendered on the page - the session state of it is only stored in the table. This is why you need to do it the way I described. You could do a workarround and create a hidden item on your page and compute the value of it using the application item value. Then you would be able to get the value of your application item using $v function.
    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>');

Maybe you are looking for