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,

Similar Messages

  • Setting the value of an Application Item (setting a global variable);

    In APEX 3.2.0.00.27, I need to initialize a global variable to 0 to implement a variable for testing to see if anything on the page has changed. Will update to 1 when certain select lists on the page are changed. Have read through some similar questions and replies within the forum as well as other blogs and sites. So, I believe what I am doing is the way to go about this. Unfortunately, my initialization of an application item/global isn't happening yet. here's a rundown of what has been implemented:
    1) created an application item, G_CLASSIFICATION_ID_NEW in the shared components;
    2) created Javascript (JS) function called by addLoadEvent in the page html header region so when the page loads, the G_CLASSIFICATION_ID_NEW global/application item should get set to 0 with the following JS and using AJAX and htmldb_GET:
    <script type="text/javascript">
    function initVars()
    alert("before get initvars");
    var get = new htmldb_Get(null,$x('pFlowId').value,null,22);
    get.add('G_CLASSIFICATION_ID_NEW', 0);
    gReturn = get.get();
    if(gReturn){
    alert(gReturn.value);
    get = null;
    alert("after get initvars");
    alert("before call to initpage");
    addLoadEvent(initVars());
    </script>
    I've used the htmldb_Get with success for populating other global variables and running On Demand Processes with onchange JS calls in the html form element attributes within select lists on the page. Afterwards, I can check the globals via the Session window and searching on Application Items. Unfortunately, I'm missing something because my G_CLASSIFICATION_ID_NEW never gets populated when I load the page. The alerts all popup when the page is loaded, so I know the script is being executed when the page loads. the alert(gReturn.value) comes back undefined. And, needless to say, the G_CLASSIFICATION_ID_NEW to 0 is not occurring.
    I've tried the htmldb_Get with it calling an application process and without (set to null). From what I've read, you shouldn't need to call an on demand process to have the get.add set the global variable. Then again, this could be where I'm going wrong. however, as I've mentioned, this works for other functions called from an onchange to populate an application item, but the page has already loaded when the onchange(s) get executed. They may work because the page is already loaded when the onchange is called. My point here is that my other On demand processes are NOT setting or changing the global variables at all. The globals are getting set with the get.add(<app item>, <value>) portion of my other JS functions within the HTML Header region. So, I'm inclined to believe that I don't need the 'application_process=<some_odp>' parameter set, but if that's not true, please let me know. if so, what would need to be in the on demand process--ie, what would be the purpose of the get.add(<application item>, <value>) if I set the global variable in the on demand process because that's the only thing I could think of doing within an on demand process for this?
    If somebody can point out what I'm not understanding or failing to do here, that would be great. I'm doing fine with APEX, but wouldn't consider myself a guru with it just yet. I'm definitely not a JS/AJAX guru, and when things like this go astray, I get bogged down because I'm not sure of the problem. So, I'm hoping you gurus who monitor this forum can get me going in the right direction.
    thanks,
    bob

    Hi Jari,
    Does that javascript work if you place it some of region footer on page 22 ?Yes. I cut it out of the html header of the page, and put it in the footer of the first region on the page. It initializes the variable. Putting it into the footer of the first region on the page should work for me instead of having an extra region on the page that's being picked up from page 0.
    Is your page 22 authentication public ?No. This particular page is set for an ADMINISTRATOR only. That said, I am logged in as an administrator. So, I cannot see why setting authentication should make a difference as long as I have that authentication/authorization. Also, there will be other pages where I want to use this script or a similar script, but again, those pages will not be open to the public. the authentication will be "role" based where a user will not necessarily have to be an administrator, but they will have to have a certain role to access the page. Is there a known problem or something that precludes a html header JS script from doing an addloadevent when authentication is NOT public?
    thank you,
    bob

  • KO23 Object currency assigned  value not equal Line item assigned value

    Dear all:
                    I have one problem.  Some Internal Order budget  use KO23  view about Object currency assigned value not equal Standard Reprt
    S_ALR_87013019 - List: Budget/Actual/Commitments  assign value.
    I don't knew what happen ?
    So I wish someone can give me a hand. Tel me how to fix this problem.
    thank you !

    Hi Jason,
    First of all:
    The displayed account code must be translated into the internally used code ("_SYS...") when using segmentation - when not using segemntation it is just internal code = displayed code.
    The code displayed is just a sample to give you a hint in case you are already familiar with the SAP Business One application.
    Therefore the sample code does not talk about where you got e.g. the value for FormatCode from ("FormatCode" is e.g. a field in table OACT where the account name with segments is (redundantly) stored without separators).
    The user should know on which account he/she wants to book a line on; maybe you might want to give some help to the user by displaying a dialog with suitable - or preselected accounts?
    In addition I am sure you know how to assign a string value to a string property - without explicitly writing it, right?
    HTH,
    Frank

  • Very slow performance when assigning value to a form item

    Dear all,
    I have an add-on form that contains 30 text edits. I did not creat the from with screen painter but positioned them by marking each item's top and left position in the new sub.
    I have named them as 'edBox1', 'edBox2'......, 'edBox30'
    At a point I need to assign value to each edit text, I have queried the content from DB into one recordset. However, when I start to assign values to each edit text, the performance became very slow.
    my code is as follow
    me.form.items.item("edBox1").Specific.String = recordset.field.item(0).value.tostring
    me.form.items.item("edBox30").Specific.String = recordset.field.item(29).value.tostring
    I found that B1 seem to iterate each item on the form in order to find the item I specified.
    so I think I should specificy items earler.
    Now for each item I dim an object for it at new sub
    Dim oedBox1 As SAPbouiCOM.EditText
    Dim oedBox30 As SAPbouiCOM.EditText
    and while creating forms, I specificy each item to the matched object
    Then I assign values to items by
    oedBox1.String = recRetrive.Fields.Item(0).Value.ToString
    oedBox30.String = recRetrive.Fields.Item(29).Value.ToString
    However, B1 still iterates to find the item and the performance is still slow, does anyone has a better solution to this issue? please kindly advise.
    Thank you
    Alan
    Edited by: Chih-Peng Chen on Dec 17, 2007 8:42 AM

    Hi Chen,
    you can find one example under SDK samples which will guide on using datasources
    Bind the controls to dbdataource and then query the datasource.
    then update form using oForm.Update(),this will automatically fill the values in all edit boxes and it will be very fast as well
    Hope it helps you
    Regards
    Vishnu

  • Assigning value to the dynamic item

    Hi All,
    I am trying to achieve the following
    1. Create a program unit that passes the block name and item name
    2. Build :<BlockName>.<ItemName> and assign the value say 'Yes' / 'No' based on the condition.
    3. I do not want to hard code the block name and item name.
    Any ideas on how to complete this?
    TIA,
    Nilesh

    Hello,
    Use the Copy() built-in.
    Francois

  • 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

  • Getting Application Items to work with login

    I'm relatively new to Apex, so I've been creating numerous sample applications. In my latest one, I've been working on custom security schema and it's been working great for the most part. The one issue I'm having is passing login values into my application items. Though I don't receive any error messages or anything, upon checking the value of the application items via the session button, they never contain anything. The code I have in place on my login page is as follows:
    begin
    select username, user_id
    into :F56_USER_NAME, :F56_USER_ID
    from GS_USERS
    where username = lower( rtrim( ltrim( :P101_USERNAME ) ) );
    exception
    when others then null;
    end;
    wwv_flow_custom_auth_std.login(
    P_UNAME => :P101_USERNAME,
    P_PASSWORD => :P101_PASSWORD,
    P_SESSION_ID => v('APP_SESSION'),
    P_FLOW_PAGE => :APP_ID
    Does anybody know why or why not this wouldn't be working? I appreciate the help!

    941907 wrote:
    Prabodh wrote:
    In all probability your PL/SQL block is raising an exception that you are unable to see because of your EXCEPTION section.
    As has been advised by Joel, remove the EXCEPTION section and let the error propagate. At least you will see it and thus be able to address it.
    Regards,Cheers, this was the solution. I was able to at least see the proper error and address it this way. The exception section I wrote was actually based on a tutorial online, so I'm curious as to why others use that if it's essentially of no use when errors arise. Regardless, my solution is fixed. Thanks!Good question: I guess it comes down to your acceptance of Rumsfeld doctrine. IMO there are potentially places where you can legitimately use the "WHEN OTHERS" exception clause e.g. if you want to quietly capture an exception and not have it bubble all the way up to the user interface in an uncontrolled manner.
    That is predicated on these conditions:
    1. You have already attempted to anticipate and handle (where appropriate) "known" exceptions first e.g. a no_data_found exception in conjunction with a SELECT ... INTO statement
    2. Your program/application is able to gracefully deal with "unknown unknown" exceptions or is otherwise unaffected
    3. You record the mystery exception in some meaningful manner (e.g. a debug log) that will allow you to trace it back to source
    The above conditions being true are usually quite rare though. Even then, I would be wary of using it in a very low-level routine as the deeper an exception occurs (and is captured), the less context you have to describe what happened. If I ever use this clause, its near the "top" of my code (indeed, often only in Apex Page/Application Process level).
    It's worth taking 5-10 minutes to have a read through the exception handling advice in the PL/SQL Language reference.

  • 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

  • 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

  • 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>');

  • 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

  • Application Items/Session State Values and Page Branching

    I have users coming into a specific page in my application, passing in a value on the url that sets the value of an application item, where a validation routine occurs. If their session validates, I want to send them to one page, if it does not, I want to send them to a login error page.
    During validation, I am setting the values of several application items so that these values can be saved and used throughout their session. The values appear to be setting correctly. I am concerned that setting the application items may not be limiting these values to a particular session. So, I have also tried setting the setting session state variables with code like:
    apex_util.set_session_state ('F203_REQ', vReqID);
    I found it curious though when I ran this page, not trying to branch so I could check session state, these values showed up as being application items and I saw nothing under session variables.
    The problem I am having is that once validated I don't know how to branch to these other pages. I have tried adding some javascript in the header to force a page submit so that I could use a branch setup on the page. However, when it comes time to evaluate the branches (it's using one of the application item values I set earlier), I'm getting an error that no branch has been provided. Further research suggests the application item values are being cleared on the page submit.
    So, (1) I either need to know how to preserve those values on submit so the page branch works or (2) I need to branch to the new page without using a page submit and instead doing that in a some code (assuming submit is clearing application item values). I have not been able to find an example of how to do this in code. If there is a way to do this in code, will the application item or session state variable values be retained? I will need these values to be available to the user throughout their session.
    Thanks for the help,
    Steve

    Steve,
    I am concerned that setting the application items may not be limiting these values to a particular session.They are set in the current session only.
    It is hard to know what you are doing exactly without seeing it. If you set up an example on apex.oracle.com we could could address one specific question at at time.
    Scott

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

  • Application Items - Request Value?

    Hi,
    I am just wondering if someone can explain to me about the request values.
    I set up a page item to display the request value. Now when I put the request attribute into the url, this item displays the value of the request. Except, when calling javascript:doSubmit('SOME_VALUE'); this value doesn't appear in the page item. I was under the impression this function sets the value of the request.
    How does apex know it is the request when it isn't in the page item? (i.e. when using it as a condition).
    Ta,
    Trent

    Hi,
    Why they act differently, I couldn't say. I have seen this in the past, though, and you could "save" the request value in an Application Item and use that in the condition. Have a look at: Re: Trying to identify my tabs in my tree navigator sql
    Andy

  • 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

Maybe you are looking for

  • Grouping within a group in XSLT 1.0

    Hi, I have the below XML, from which I need to generate multiple groups within groups. My sample XML: <XmlContent> <SalesInvoices2> <NewDataSet> <Table>   <F1>ID</F1>   <F2>NumberOfEntries</F2>   <F3>JournalID</F3>   <F4>Description</F4>   <F5>Transa

  • Can't unlock padlock in User Accounts System Preferences

    I'm having all sorts of problems and suffering from sleep deprivation due to the fact that after some problems with the Rohos USB KeyLogin SW, lost password, reset using apple ID and change some things from single user mode per the Rohos website (htt

  • I keep getting calls from non existing area codes and phone numbers.  They are never the same number twice.  How do I stop this?

    About a week ago I started getting phone calls on my cell phone from numbers that do not exist, including the area codes.  I can not report these to the Do Not Call list because the area code is non existent.  I'm getting these calls all the time now

  • Settings for SCE in CRM 5.0

    Hi I am using CRM 5.0 in our environment. We have made the settings for VMC, and it is now running fine. After this what settings do I need to make for SCE. As per documentation available, RFC connections are not required for SPE, SCE or TTE. But whe

  • Flex + Sending ArrayCollection to Server + Request Scope

    Hi All, I have a requirement where I have to send an ArrayCollection instance containing actionscript instances to server side. Server side component is java servlet. Could anyone please tell me how this can be done. I hav explored flex APIs where I