Htmldb_Get() not updating session state?

Thankfully, I solved this problem myself before posting this, but I still have questions about why I ran into the problem in the first place.
Alright, I have a javascript controlled interface on an ApEx page that uses htmldb_Get() for retrieving the current state of a row in the database and for submitting the data back to a page process to update the database row. I've checked my values from the javascript function that saves the data and the strings do contain the updated text from the interface, but when my page process fires off the strings have reverted to what was in the session state from the earlier AJAX request when the interface was loaded.
* I've checked the session state and the variables in question are reverted, but I noticed that the item statuses are listed as "Updated".
* I've also tested this process by passing the request string and page items in the URL and the process functions correctly.
* I've double checked the item definitions to see if the items were being overwritten (they weren't).
* I've checked the item types to make sure that none were "protected" (they weren't).
* I haven't found any error messages in logs within ApEx.
At this point I noticed that the AJAX requests to load the interface were showing up in the "Recent Page Views" report, but the save requests were not. For no particular reason I decided to switch from using the request string in the conditional for the page process and use a page item to control the mode as so...
WAS:
var get = new htmldb_Get(null,$x('pFlowId').value,'save_asset_tracking_info',11);
NOW:
var get = new htmldb_Get(null,$x('pFlowId').value,'',11);
get.add('P11_FORM_MODE','save_asset_tracking_info');
...and magically the page items in the session state are being updated and all is well. There are few things more frustrating than spending hours debugging a process, then fixing it with an action that you are completely convinced won't change a thing.
This make no sense to me and I'm hoping someone can explain it or at least point me in the right direction.
Thanks in advance,
Jason

Apologies if I skipped a few details in my first post...
I haven't included much of my source code because I don't believe it's the key to this issue. If you disagree, I will post the source code for your reference.
On page 10 of my application, I have a floating div interface that appears in front of the page content. This div is initially empty, but I use JavaScript to make an AJAX call to page 11, strip out a specific region using the get.get() function. On the floating interface, there is a "save" button that fires off another JavaScript function that uses htmldb_Get() and get.add() to post all 21 of the items from the floating interface back to a page process on page 11. The "save" page process is at process point "on load - before header" and is extremely simple -- "if ID found then update record, else insert record".
The problem I had was that after the "save" button was pressed, all of the items sent via AJAX to the page process were always identical to the initial values from when page 11 was rendered and the floating div interface was populated. This seemed like some sort of quirk or issue with the session state cache overwriting the values that were being sent via AJAX. As I said before, I checked the values in JavaScript immediately before the AJAX "save" submission and everything was kosher, but the page process never got those updated values.
I managed to eliminate this "symptom" by simply...
1. Setting the htmldb_Get() request string to null ("")
2. Adding one more get.add() call for P11_FORM_MODE
3. Changing the condition on which the page process was fired from the request string to the page item
All of the other get.add() calls remained the same as did the PL/SQL in the page process.
Thanks,
Jason

Similar Messages

  • How to update session state from form field values without submitting page?

    Hi,
    I am new to Oracle APEX. I am using Oracle Apex 4.2 on Oracle 11g release 2. The problem is that when I am entering data on a form, when I enter a value in one field and move to the next field, how can I use the value of first field in the validation procedure of next field? I know that when we enter data in fields, the session state is not updated with these values until we submit the page... right... but I have seen that if there is a control of List box type, then Apex gives an option "Action When List changes" where we can choose option to update corresponding session state field with the value of list box item, without submitting the page.
    Now my questions is why this option is only available for List box items? why not for other item types like Text box, Check box,... ? can someone please help me with this?
    (the issue with update of session state depending on page submitting, is that we need a complete network round trip from client to server in order for it. However if we can update session state variables without submitting page, then we can avoid this network traffic).
    Any help will be greatly appreciated. Thanks in advance.

    Create a dynamic action on change and run a PL/SQL process there with the following code:
    BEGIN
       NULL;
    END;Page items to submit > your item.
    This will set the session state without submitting the form.
    Further examples here:
    http://apex.oracle.com/pls/apex/f?p=31517:229
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.apress.com/9781430235125
    http://apex.oracle.com/pls/apex/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------

  • Items not in session state when column link used and prevpage not submitted

    I have a report on page 2 (cemetery lot info) with a column link to page 3 (burial info).
    There is a process on page 3 that updates billing information using items from page 2, and billing code selected on page 3. The problem is, if the user does not submit page 2, session state is null, or has values from previously submitted page 2. How do I make sure the billing info is correctly updated from items displayed on page 2, if they are not in session state?
    begin
    if :P3_BILLING_CODE = 'OWN' then
    :P3_BILLING_NAME := :P2_OWNER1_FIRSTNAME||' '||:P2_OWNER1_LASTNAME;
    :P3_BILLING_ADDRESS1 := :P2_OWNER_ADDRESS1;
    :P3_BILLING_ADDRESS2 := :P2_OWNER_ADDRESS2;
    :P3_BILLING_CITY := :P2_OWNER_CITY;
    :P3_BILLING_STATE := :P2_OWNER_STATE;
    :P3_BILLING_ZIP := :P2_OWNER_ZIP;
    :P3_BILLING_PHONE := :P2_OWNER_PHONE_AC||'-'||:P2_OWNER_PHONE_EX||'-'||:P2_OWNER_PHONE_SC;
    elsif :P3_BILLING_CODE = 'MGR' then
    :P3_BILLING_NAME := :P2_NEW_MANAGER;
    :P3_BILLING_ADDRESS1 := :P2_NEW_MANAGER_STREET;
    :P3_BILLING_ADDRESS2 := null;
    :P3_BILLING_CITY := :P2_NEW_MANAGER_CITY;
    :P3_BILLING_STATE := :P2_NEW_MANAGER_STATE;
    :P3_BILLING_ZIP := :P2_NEW_MANAGER_ZIP;
    :P3_BILLING_PHONE := :P2_MANAGER_PHONE_AC||'-'||:P2_MANAGER_PHONE_EX||'-'||:P2_MANAGER_PHONE_SC;
    elsif :P3_BILLING_CODE = 'FH' then
    :P3_BILLING_NAME := :P3_FUNERAL_HOME1;
    :P3_BILLING_ADDRESS1 := :P3_FUNERAL_HOME_ADDRESS;
    :P3_BILLING_CITY := :P3_FUNERAL_HOME_CITY;
    :P3_BILLING_STATE := :P3_FUNERAL_HOME_STATE;
    :P3_BILLING_ZIP := :P3_FUNERAL_HOME_ZIP;
    :P3_BILLING_PHONE := :P3_FUNERAL_HOME_TELEPHONE;
    end if;
    update cm_burial set billing_name=:P3_BILLING_NAME, billing_address1=:P3_BILLING_ADDRESS1, billing_address2=:P3_BILLING_ADDRESS2, billing_city=:P3_BILLING_CITY, billing_state=:P3_BILLING_STATE, billing_zip=:P3_BILLING_ZIP, billing_phone=:P3_BILLING_PHONE
    where recordid=:P3_RECORDID;
    end;

    Hello,
    If I understand you correctly, it seems like your page logic is a bit problematic. The scenario I see is that the user is populating the form part, submiting the page, and the report region is being displayed (as the where clause depends on an item from the form region). Now, the situation you are describing, where the billing information is not correct, is possible if the user changed some of the form items on page 2, didn't submit the page – hence didn't update the report region – but still chose to branch to the next page, using the (non-updated) report link column. If I understand it correctly, you should first correct this situation. If the user is changing some details in the form section, the page should be re-submitted. This will resolve your problem, because as part of the page submit process, session state will be set correctly.
    I believe this is the simplest and correct solution. Other options, like updating session state per changed item (using JavaScript) will be much more complicated.
    Regards,
    Arie.

  • 4.2 select list on mobile page not setting session state

    Hi,
    Like I've done dozens of times in the past, I created a Select list that submits on change, and I expected session state to be updated accordingly.
    I tried this on a mobile page but session state is not updated for the item.
    Has anyone else experienced this?
    Scott

    Hi Scott,
    is it possible that you are hitting bug# 14680379 - PAGE SUBMIT ACTIONS DO NOT WORK FOR LONGER MOBILE SELECT LISTS, WHEN DEFINED TO FIRE WHEN THE SELECT LIST VALUE CHANGES
    on our Known Issues List http://www.oracle.com/technetwork/developer-tools/apex/application-express/apex-42-known-issues-1863578.html ?
    Is your select list selection displayed as native control or as popup? Can you create a test case on apex.oracle.com?
    Thanks
    Patrick
    My Blog: http://www.inside-oracle-apex.com
    APEX Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • Update Session State for only one item

    I have several hidden items (e.g. fund, object and unit) that hold values that are input parameters for a function that returns a SQL statement to a 'PL/SQL Function Body Returning SQL Query' region. These hidden items are set when a user selects a value from a pop-up tree. I want to dynamically set corresponding visible prompt text items (fund_prompt, object_prompt and unit_prompt) to a descriptive value that makes sense to the user. I've tried using a source type of SQL and placing the following SQL statement in the source
    SELECT child_prompt
    FROM fr_hierarchy_fund
    WHERE child = :FUND;
    When the value in one of the hidden items is changed, the visible prompt item displays "undefined" until the page is submitted.
    Is there a way to set the session state of an item without submitting the page?
    Thanks
    David

    David,
    Items, hidden or not, are not set in session state until the page is submitted. You might consider submitting the page with a javascript event on your popups. The request value can be used to control what processing you do or don't do on page submission and a branch right back to the page should allow you to show everything based on current item values.
    Scott

  • Form field displaying but not in session state

    I have a form which displays data depending on node selected in a tree. The data displays ok and allows me to update but If I try to access a value ( I want to filter a select list ) its empty.
    Displaying all session values reveals that only the primary key of the form is held in sessikon state. I have set the value I want to read to 'Display as Text ( saves state )'
    Regards
    Seán

    I have 2 regions, a tree and a form. The form was created with the wizard and I added the tree afterwards.
    The tree nodes are links which branch to the same page and set the value of the primary key field .
    I've copied the event view of the page below...
    Page Rendering
    Process: After Header Fetch Row from ALL_COST_CENTRE (#OWNER#:ALL_COS..)
    Region: Tree Page Template Body (3) (1,20)
    Admin Tree
    Tree: 11210417299635529
    (50) P8_TREE_ROOT [Hidden]
    Region: HTML Text Page Template Body (3) (3,10)
    Office Details
    (10) CANCEL Location: Template Close
    (30) SAVE Location: Template Change
    (1) P8_COST_CENTRE [Display as Text (saves state)]
    (10) P8_NAME [Display as Text (saves state)]
    (15) P8_OFFICE_TYPE [Display as Text (saves state)]
    (30) P8_DIST_PARENT [Select List]
    (40) P8_ADMIN_PARENT [Select List]
    Region: HTML Text Page Template Body (3) (3,40)
    Administration
    No computations
    Page Processing
    No computations
    Validation: P8_NAME not null (Inline+Notification) sequence: 10
    Process: After Submit Process Row of ALL_COST_CENTRE (#OWNER#:ALL_COS..)
    Process: After Submit reset page (8..)
    Go To Page: f?p=&APP_ID.:8:&SESSION.&succe (After Processing) sequence: 1 Unconditional

  • URL Not Changing Session State Variables Specified

    I am trying to change a variable on a target page with a URL, however, the variable never changes. The variable is set to 8. I send the following URL which should change it to 0 but it does not change.
    We just recently upgraded to 1.6
    Why is this not working. It still works on pages I designed prior to the upgrade, but I can't get it to work since the upgrade.

    I am trying to change a variable on a target page with a URL, however, the variable never changes. The variable is set to 8. I send the following URL which should change it to 0 but it does not change.
    We just recently upgraded to 1.6
    Why is this not working. It still works on pages I designed prior to the upgrade, but I can't get it to work since the upgrade.

  • Row fetching, session state, multi-page processing of 1 row - problems

    I'm building an application that's updating a couple of tables via an updateable view and an instead-of trigger. That portion of it works OK, EXCEPT for the problems that I'm having with the APEX end.
    I've got 3 pages; the first page reads the row in via the automated row fetch and has, say columns 1-20.
    Page 2 has, say, columns 20-40 and page 3 has the remainder.
    I have the row fetch set up conditionally so that it only executes the first time that page 1 is displayed. All the columns are set as Database Columns.
    It seems that if I fill in fields on page 1, move to page 2, and back to page 1, the contents of the fields on page 1 are destroyed unless I set their 'Source used' to 'Only when the current value in session state is null'.
    Furthermore, upon update (which is on page 3, via an automated row update), the only columns that get updated are those that exist on page 3. The column values from the other pages no longer exist.
    Does navigation to another page not retain the session-state of database-column items?
    Am I better off just writing my own processes to perform the updates?
    Any other suggestions?
    Frank

    Hello Frank,
    >>I have the row fetch set up conditionally so
    that it only executes the first time that page 1 is
    displayed …
    It seems that if I fill in fields on page 1, moveto page 2, and back to page 1, the contents of the
    fields on page 1 are destroyed unless I set their
    'Source used' to 'Only when the current value in
    session state is null'.
    It seems that the first sentence is not consistent
    with the second one. The only reason the values are
    destroyed, as you call it, is that the ARF is running
    again. What condition are you using on your ARF?
    In any case, the right way to deal with it is to
    change the source used to "Only …", as I understand
    you already did.
    Hi Arie,
    I set an item after the first ARF. I then have the ARF set to execute conditionally based on the presence of that item. (I also display a success message on the ARF, so I know that the ARF is only occurring once). I move to subsequent pages by submitting the current pages.
    >>Does navigation to another page not retain the
    session-state of database-column items?
    Navigating to another page does retain the session state values.
    It's depends on what you mean by navigating.
    Submitting the page set/update session state.
    Redirect without submitting the page will not
    set/update the session state.
    >>Furthermore, upon update (which is on page 3,
    via an automated row update), the only columns that
    get updated are those that exist on page 3. The
    column values from the other pages no longer
    exist.
    Automatic DML is working only with the current page
    items. You can't use it to insert/update other page
    items, even if they are in session state. However, in
    your case, it's not the Automatic DML performing the
    actual updates, but your triggers. Are your triggers
    relying on session state values?
    I think this statement 'Automatic DML is working only with the current page
    items.' answers my question. My trigger is working on session state values. It's an 'instead-of' trigger, so I was letting the automatic DML perform the 'update' on the view, while allowing the trigger to do the actual update of several tables that the view joins by referring to their :NEW. values in the trigger. Since the DML occurs on my last page, those were the only session state values that my trigger ultimately saw.
    >>Am I better off just writing my own processes to
    perform the updates?
    I believe the correct way is to submit the page and
    then branch to the next one. Submitting the page will
    save all your items in session state, and allow these
    items to be available for page 3 DML.
    Regards,
    Arie.I'm doing that already - all the values do appear to be in session sate, except only the items that are on the last page actually make it to the automatic DML update, which seems to agree with your previous statement.
    I suppose I could write my own process to perform the update, as the values are available in session state.
    Thanks,
    Frank

  • FF67 Manual bank statement transactions not updated in G/L accounts.

    Dear All,
    The user has posted the Manual bank statement in the FF67 and saved. But the postings are not updated in the G/L accounts but in FF67 the bank statement is showing that "posting completed".  When I check that The Job name has finished successfully in sm37. but when I check in SM35 the batch session also has been created with the same user ID. But it has not processed.
    When i ask the user he is saying that they don't process the Batch input session. They just save the FF67 T.code. after some thime the job will complete and post to the G/L accounts.
    Please could any body let me know what could be the problem.
    When we enter the FF67 the system will ask the start variant and the processing type. There are 4 options in the processing type. could any body explain me about the 4 options.
    Regards,
    Mr.Rao.

    Dear All,
    Here the user has selected the processing type is 2. That's why the system is created the batch input secssions. so the G/L accounts will be hitted after the batch input secssion are processed.
    Regards,
    Mr.Rao.

  • Session state is not being passed properly to another page

    Hello Gurus,
    I have a multi-page application which authenticates using a simple authentication page 101. Right now I have a generic authentication scheme which always returns true (Session Verify Function= return true; I will integrate LDAP later.) It works fine. The app remembers the username from one page to the next (popup pages mainly).
    My issue is that, after exporting the application and re-importing into a new workspace, the user/session state is no longer being preserved from page to page. It prompts for a login every new page that is opened (the popups). This ruins the flow and functionality of the app.
    I've checked every setting (I think) and cannot find any differences between the two workspaces or apps. Any ideas why this would work in one workspace and not the other?
    TIA!
    Jonathan
    I should also indicate that the issue seems to be specifically in calling "callmypopup" function. For some reason it isn't passing the session id properly to the popup page, where it did fine in the other workspace. function text:
    function callMyPopup (sourceItem, popuppagenum, targetItem, appid, appsession) {
    //opens popup pg and passes value in sourceItem to targetItem
    //sourceitem=calling text box, targetItem=text box in popup page
    var minlength = 3;
    if (CheckLength(sourceItem, minlength))
    var formVal1 = document.getElementById(sourceItem).value.toUpperCase();
    var url;
    url = 'f?p=' + appid + ':' + popuppagenum + ':' + appsession + '::::' + targetItem + ':' + formVal1;
    w = open(url,"winLov","Scrollbars=1,resizable=1,width=800,height=600");
    if (w.opener == null)
    w.opener = self;
    w.focus();
    else {alert('Please enter at least ' + minlength + ' characters in your search.');}
    Edited by: austindurant on Sep 5, 2008 7:02 AM
    Edited by: austindurant on Sep 5, 2008 7:46 AM

    It looks like your session id is not correctly passed to your popup page. Try using:
    javascript:popUp2('f?p=&APP_ID.:1:&SESSION.:::::', 600, 700);
    instead, which does the same thing. Put your parameters for the page items there if required.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • HT1338 my mac is running 10.5.8, I bought a new Nano, itunes is prompting me to get the current itunes, but my mac will not take it, states I need 10.6.8.  How do I get that?  When I run a software update, system says there is none.  Help

    my mac is running 10.5.8, I bought a new Nano, itunes is prompting me to get the current itunes, but my mac will not take it, states I need 10.6.8.  How do I get that?  When I run a software update, system says there is none.  Help

    Click here, check that your computer meets the requirements, buy and install the DVD, and then run Software Update.
    (73181)

  • Use session state values to set column value during insert/update

    I am building an APEX 4.2 application that uses the canned Data Loading control to upload csv data to a table.  I have modified the 'Select Data Source' page of the workflow and it now contains three LOV's that the user selects values from.  The selected values are stored in Session State.  As I'm new to APEX, I do not know how to reference Session State objects in the context of the Data Loading workflow so that the appropriate columns are set with the correct values.  My assumption is that the columns that are apart of the insert statement reside in a collection somewhere.  I just don't know how to loop through the collection, determine the correct column, and then set that column's value equal to the corresponding LOV value in Session State.

    Scott,
    This is in version 2.2.1 and there are no caching features available.
    The application does require login.
    I'm playing around with the APP_UNIQUE_PAGE_ID right now but I am finding that even in the builder if I edit the attributes of a report column and then try to edit another column it will bring up the last column I edited. Even if I use the record navigation buttons next to the Apply Changes button it will keep bringing me the same page over and over unless I constantly refresh the pages.
    Greg

  • Sender JDBC adapter -- Update SQL statement NOT work for the last record

    I'm trying to use SAP XI to send records from Oracle database to As/400 using JDBC adapter.  I've defined the communication channel for sender
    (1)  The "Query SQL statement"  = select  a_bgn_dt,  a_end_dt from  PX_PXXD WHERE NOT CU_ACTION_CD='P' 
    (2)   The "Update SQL statement"  = update PX_PXXD set CU_ACTION_CD='P'  WHERE NOT CU_ACTION_CD='P' 
    Supposed that 3 records were retrieved from (1) and successfully updated to AS/400 but only the first 2 records in Oracle database are updated according to (2)
    Any advise.
    Pansy

    Hi Pansy,
    You select and update query is looking like wrong
    kindly check below query,If you are using oracle
    (1) The "Query SQL statement" = select a_bgn_dt, a_end_dt from PX_PXXD WHERE CU_ACTION_CD !='P'
    (2) The "Update SQL statement" = update PX_PXXD set CU_ACTION_CD='P' WHERE  CU_ACTION_CD !='P'
    Thank you
    Sateesh

  • Query referencing session state not consistently returning data

    Hi,
    I have a form that summarizes expense data by category for employees, per fiscal year, fiscal period, and project.
    Clicking on a button next to a particular category takes the user to a new page that should display the detail of those expenses, based on expense_code.
    The expense_code is passed via URL to the second page, and the query region for the detail has the following source:
    select exp_code, JRNL_ID_NO, DESCRIPTION, REFERENCE, CUR_PER_TRAN, CUM_YTD
    from fgspec_ac where exp_code between :P118_EXPENSE_CODE_FROM and :P118_EXPENSE_CODE_TO and project=:P114_PROJECT and fis_year=:P114_FIS_YEAR and fis_period=:P114_FIS_PERIOD
    :P118_EXPENSE_CODE_FROM and :P118_EXPENSE_CODE_TO are passed via URL, and the :P114_% fields reference data on the initial form.
    The problem is that when I click on the button to bring up the detail for the first time, the query returns no rows. If I return to the original form and click on the button a second time, the query the displays the required data. This behavior is consistent, regardless of expense category, fiscal period, etc. The first time I try to access detail, no records returned, but the second time, it works.
    I have used the 'SESSION' link to debug and view the session state in each case, and the results are IDENTICAL whether the query returns data or not. That is, all 5 variables contain the exact same data.
    Do you know what I might be doing wrong?
    Thanks,
    Michelle

    Hi guys,
    Thanks very much for your replies. In fact, I have tried both methods. Yes, I am navigating from page 114 to 118, and passing values to page 118 from page 114 (ie: P114_PROJECT passes to P118_PROJECT, etc...). In my query, I have tried referencing both, with the same results.
    When checking values in session state (by using the 'SESSION' link), values from page 114 are available in both cases (when the query returns rows and when it does not). It is very strange behavior.
    I have been developing with HTMLDB for over a year now, and never seen anything like it!!! I will try loading this on HTMLDB.oracle.com, and see if it replicates, and if so, maybe you can have a look...............
    Thanks!
    Michelle

  • Icloud is not backing up on my Ipad and Iphone. i also tried conneting to the computer to back it up and i get the following error message back up could not be completed beacause a session could not be started. also photo stream is not updating either.

    icloud is not backing up on my Ipad and Iphone. i also tried conneting to the computer to back it up and i get the following error message back up could not be completed beacause a session could not be started. also photo stream is not updating either on both devices

    Curretly, there is an iCloud blackout.  It started this morning around 2AM California time (Pacific), 5AM New York (Eastern).  A lot of people have been having issues all day, including me.  No iCloud services are online.  Even Find My iPhone is down.

Maybe you are looking for

  • Is it possible to see transcript from analyzed clips when working in multiclip view?

    I have a 2 camera interview and a transcript and would like to use the to use the speech analysis feature in the multiclip window to edit the 2 clips together. Macbook Pro 2.3 ghz i7 8gbRAM OSX 10.9.1

  • Safari is bloated

    Safari has brought my two-year-old macbook pro to its knees.  After browsing for a relatively short period of time, with about four tabs open, the virtual memory used by "Safari Web Content" approaches 1 GB, and the computer spends most of its time p

  • IDOC for outbound delivery

    Hi All, I need to generate an outbound IDOC when DO is created in VL01N. I searched in SDN and it returns me a lot of different results that really confusing. I found some using IDOC_OUTPUT_DESADV01, some using IDOC_OUTPUT_DELVRY. I do look into the

  • Error when trying to configure Oracle 10g Personal Edition

    seemingly task is never ending. request oracle to make better products. Here is the error message I get when attempting an install on a Windows XP Professional laptop. Failed to allocate port(s) in the specified range(s) for the following process(es)

  • No Goods Receipt on a weekday..

    Hi, My client does not want to have any goods receipt on Monday (from exernal vendors). Its not a factory holiday. I know that i can acheive this in MRP by using planning calender. However is there any way that I can acheive this requirement also for