Items session State from form to another ...

Hi Guys,
I have been trying to pass items session state from one page to another page that is opened on Sikllbuilder Modal Page, but to no avail.
I have been trying to pass items session state from one page to another page using branch , but to no avail.
Can you please have a look...
workapce: fam
user: test
pwd: test
Application 64941 - Modal Page
On the setting of Skillbuilders Dynamic action, I used this Static URL:
f?p=&APP_ID.:2:&APP_SESSION.:::2:P2_MOBILE,P2_MOBILE2,P2_MOBILE3:&P1_MOBILE.,&P1_MOBILE2.,&P1_MOBILE3.Regards,
Fateh

Hi Trent,
Actually, i did not create new DML. and my problem is not with the source.
in a nutshell,
the items on the first page have source of Static assignment .. only one item has a default value
the items on the second page have source of Database Column .. none of the items have default value
1- What caused the confusion is:
We run the page 1 , we have an item (Mobile) with a default value ( that means it has a session state value by default ) > Concur.
I type a value on the second item ( Mobile 2) then set session values.
both items ( Mobile & Mobile 2 ) have session state values. > Concur.
Click Modal Page button to trigger the modal page. where the Static URL is:
f?p=&APP_ID.:2:&APP_SESSION.:::2:P2_MOBILE,P2_MOBILE2,P2_MOBILE3:&P1_MOBILE.,&P1_MOBILE2.,&P1_MOBILE3.We see that only the value of the first item (P1_Mobile) goes to the modal page. but rest of the items do not go.
I hope that it is clearer now..
Best Regards,
Fateh
If you want details, Please allow me to tell my scenario. I have two forms "Clients", "Inquiries".
As a client calls, I need to identify whether the client is exit on the DB or not.
So, as the client calls, we enter the mobile phone number into items that have static assignment source, then click on a button to check if the client details are already on the DB. if yes, the inquiry form shows up. if No, a modal page (that have clients form) pops up to allow inserting the details of the client in items that have Database Column Source . but since we have already inserted the mobile number in the the first step.. I do not want to insert them again in the client form.
Regards,
Fateh

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

  • Item session state during rendering

    Hi,
    Application Express 4.1.0.00.32
    Page process (before heading) sets session state for several items (Text, Always replacing ..., Static Assignment...) but the values are not persistent.
    Debug shows:
    0.32451     0.00116     ...Session State: Saved Item "P1013_REC_PP" New Value="15"          
    0.32567     0.00104     ...Session State: Saved Item "P1013_TOT_AANT" New Value="1"
    0.32671     0.00111     ...Session State: Saved Item "P1013_CURR_SET" New Value="1"
    0.32783     0.00094     ...Session State: Saved Item "P1013_REC_PP" New Value=""
    0.32877     0.00087     ...Session State: Saved Item "P1013_TOT_AANT" New Value=""
    0.32963     0.00060     ...Session State: Saved Item "P1013_CURR_SET" New Value=""
    Where is the 'second round' (immediately following the actual setting in page process) on setting session state coming from?
    Thanks, Jos

    Resolved,
    Dropped the items and recreated some new ones (with different names) and now its OK.
    The original items were copied from each other and renamed. Maybe this is (still) a bug...
    Jos

  • 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

  • Can't Set Session State from the Login Page

    I have a dilema. On the standard login page I enter values in 2 fields namely, CAMPUS (Select List) and USERNAME (text field).
    After clicking on the login button I want to navigate to PAGE 1 and use the values of CAMPUS and USERNAME to filter data. I have created two APPLICATION Level items (A_USERNAME,A_CAMPUS) to which I assign the values of USERNAME and CAMPUS in two AFTER SUBMIT computations on the login page.
    When I arrive on PAGE 1 the session state values of A_USERNAME,A_CAMPUS are still both null therefore the query returns null. It seems that the login process does not issue a SUBMIT for session state to be saved. How do I save the values in session state on login?
    In the Login PROCESS, can I specify the Page 1 items to be set and the values to set them in a URL somewhere? Is it here?
    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||':1' <<========here?
    If so what is the correct syntax?
    If I revisit the login page a second time, a submit is issued and the values are set in session state.
    Anyone got any ideas??
    I tried creating a standard position button which issues a submit but this didn't work either.
    regards
    Paul J Platt

    Unfortunately your solution is causing problems with retrieving cookies that I try to get for the campus and username during a "Before Header Process" as well. The cookies are normally set on an "After Submit" process. When I return to the login page I get
    Error ERR-1029 Unable to store session info. session=10760914996048113736 item=8561939526127479
    ORA-02291: integrity constraint (FLOWS_010600.WWV_FLOW_DATA_FK) violated - parent key not found
    But if I turn the cookies off, it seems to work OK.
    regards
    Paul JP

  • Issue with PPR and/or item session state

    using version 3.2
    On my Page2, I have two regions: HTML and a report.
    In the HTML region, I have two datepickers: FROMDATE and TODATE
    Their defaults are set to the min and max of a DATECREATED field in my table.
    In the report region is a classic report generated by sql getting all rows with a DATECREATED between the values of the two datepickers.
    In the header of the report region, I'm using the following to do a partial page refresh of the report region:
    *<script type="text/javascript">*
    *function p2Refresh(){*
    *$a_report('#REGION_ID#'.substring(1),'1','15');*
    alert($x('P2_FROM_DATE').value);
    *</script>*
    *<input type="Button" value="Refresh List" onClick="p2Refresh();">*
    I'm just using the alert pop-up to verify the info in the datepicker.
    The problem is that if I change the dates and hit the 'refresh' button, the report is NOT using the current value of the datepickers.
    I've also tried the following which is fired from an 'onChange' event of the datepickers
    *<script type="text/JavaScript">*
    *function setDate(pItem, pValue){*
    var get = new htmldb_Get (null, $x('pFlowId'), null, 0);
    get.add(pItem, pValue);
    get.get();
    get = null;
    *</script>*
    Any clues would be great.
    Thanks.
    Edited by: 903802 on Dec 21, 2011 8:27 AM

    Solved it.
    I made two changes. First, the 'onChange' for the datepickers, updated the state for both datepickers at the same time:
    *<script type="text/JavaScript">*
    *function setDates(){*
    var get = new htmldb_Get (null, $v('pFlowId'), null, 0);
    get.add('P2_FROM_DATE', html_GetElement('P2_FROM_DATE').value);
    get.add('P2_TO_DATE', html_GetElement('P2_TO_DATE').value);
    get.get();
    get = null;
    *</script>*
    However, the fix was actually because in the *"var get = "* statement, I had used *$x* instead of *$v*.
    Works like a champ now.

  • Passing value from Forms to another Portal Object

    Hi,
    I created a Portal form and a customised button to display another form ,but i need to send the value of one of the field in the URL. write now i call the other form in the (OnClick)Java Event Handler of the Button , but it's not recognizing the variable i declare for the filed value
    Thanks.

    Hi,
    I am doing something similar to what you have described. I have a custom login form with a hidden field(not login/password) which I need to pass to the next form. I tried calling the form like you have explained, but it's not working. The control goes to
    http://portalhost:7777/pls/portal/!PORTAL.wwa_app_module.accept
    and it gives a page not found error.
    Where do I need to place the pl-sql code? I have tried pasting it in the after processing section in the Additional PL/SQL Code tab, as well as in the Submit section of the PL/SQL Button Event Handler, for the Login button. Both don't work...
    Please help!
    Thanks,
    Somya

  • Apex bug?  Items being cleared in session state - can't figure out why

    I have an item that is being submitted with a value but is then being overwritten and set to null. I can't see any reason why the submitted value is being overwritten with null.
    I have been debugging this problem for most of the day and can't figure out what is happening and was hoping someone in the forum might be able to shed some light.
    Some details:
    The item is on Page 0, has source type of "PL/SQL Expression or Function", a source expression of "V('REQUEST')", and Source Used = "Always".
    I viewed the HTML source of the rendered page and can see the following HTML, so I know the item has a value when the page is rendered:
    <input type="hidden" id="RENDER_REQUEST" name="p_t08" value="EDIT" />
    I have used Firebug to view the HTTP POST body and can see that p_t08 is being correctly submitted with a value of "EDIT" in the post body.
    When I run the page in debug mode and then view the debug log, I see that Apex is indeed setting this item to null:
         0.01500     0.01600     A C C E P T: Request="WIZ_NEXT"
         0.23400     0.00000     Session State: Save form items and p_arg_values
         0.24900     0.01600     ...Session State: Save "BRANCH_TO_PAGE_ID" - saving same value: ""
         0.24900     0.00000     ...Session State: Save "ROWS_PER_PAGE" - saving same value: ""
         0.26500     0.01500     ...Session State: Save "P0_CLEAR_WS" - saving same value: ""
         0.26500     0.00000     ...Session State: Saved Item "RENDER_REQUEST" New Value=""
    I can't figure out why the item is being set to null.
    This problem also does not occur on every page. The pages in question are a multi-step "wizard" that allows the user to navigate between steps with "Next" and "Previous" buttons. Since this is a page 0 item, it appears on every page in the wizard so I'd expect it to behave the same. When you open the wizard at step 1 and press next to go to step 2, the item (RENDER_REQUEST) is set correctly on step 2 of the wizard, BUT when you then click Next to go to step 3, RENDER_REQUEST is null on step 3. If you open the wizard at step 2 and press Next, RENDER_REQUEST is null on step 3.
    I did find a work around, but it doesn't make any sense why it would work: if I move the RENDER_REQUEST item from the "Footer Items" region to a page level item (by using Edit All and setting its region to blank), then the problem goes away. If I move it back to the "Footer Items" region the problem reoccurs.
    I am working on Application Express 4.0.2.00.07 on Oracle Database 11g Enterprise Edition Release 11.2.0.1.0.
    Any help would be greatly appreciated!
    Thank you.

    Hi Patrick,
    Thanks for the quick response. Unfortunately, I can't reproduce this on apex.oracle.com due because the app requires PL/SQL packages to be installed in several schemas, including some that require system grants (I gave a presentation at Oracle Open World a couple of years ago on some of the techniques I used in building this application that you attended; I think the session was called "Building Large Commercial Applications with Oracle Database 11g and Oracle Application Express").
    Is there another way we can work together to debug this without reproducing it apex.oracle.com? For example, if you could send me an instrumented version of the APEX_040000.F procedure (or whatever procedure is clearing the session state) that has some additional APEX_APPLICATION.DEBUG calls, I could install it on my server, reproduce the error and send you the output.
    Thank you,
    Eric

  • Corrupt Session State? - Apex form posts text value as Null

    Recently I've discovered an issue with our Apex installation in which any value chosen as a source for a text field ends up being posted as a null to the database.
    We are running APEX version 3.2 within an Oracle 10.2.0.4 database using the Oracle HTTP Server from the 10g companion disk.
    At first glance, everything appears to function as expected; I have created a simple table called "oracle_sr" with 2 columns both not null:
    SQL> desc capacity.oracle_sr
    Name Null? Type
    ORACLE_SR_ID NOT NULL NUMBER
    TIMESTAMP NOT NULL DATE
    Within APEX the form wizard was used to create a form on this table.
    After executing the pages and entering a value for the timestamp field I can create records without issue.
    The issue arises when I choose a source value for the timestamp field.
    Any of the source options result in the same error (including a static value) so I will focus on the SQL Query for the source as:
    select sysdate from dual;
    This should substitute the system date within the timestamp text field when the page is executed.
    As expected, the value appears in the text box but when I submit the form to create the record I receive the error:
    ORA-01400: cannot insert NULL into ("CAPACITY"."ORACLE_SR"."TIMESTAMP")
    I have been working with APEX for quite some time and have successfully used this technique in many applications but just started to see this error over the past few days. What is particularly odd about this message is that default "not null" validations created by the form wizard sees the timestamp filed as having a value. The session state information included below is reporting a value yet the database is throwing the ORA-01400.
    Has anyone experienced a similar issue? I've spent a fair amount of time trying to research this issue but cannot seem to find any similar posts.
    I have included the debug output from my test page, from what I can see, there does seem to be a value associated with the timestamp filed:
    0.00: A C C E P T: Request="CREATE"
    0.00: Metadata: Fetch application definition and shortcuts
    0.00: NLS: wwv_flow.g_flow_language_derived_from=FLOW_PRIMARY_LANGUAGE: wwv_flow.g_browser_language=en-us
    0.00: alter session set nls_language="AMERICAN"
    0.00: alter session set nls_territory="AMERICA"
    0.00: NLS: CSV charset=WE8MSWIN1252
    0.00: ...NLS: Set Decimal separator="."
    0.00: ...NLS: Set NLS Group separator=","
    0.00: ...NLS: Set date format="DD-MON-RR"
    0.01: ...Setting session time_zone to -06:00
    0.01: Setting NLS_DATE_FORMAT to application date format: DD-MON-RR
    0.01: ...NLS: Set date format="DD-MON-RR"
    0.01: Fetch session state from database
    0.01: ...Check session 2303701116904676 owner
    0.01: Setting NLS_DATE_FORMAT to application date format: DD-MON-RR
    0.02: ...NLS: Set date format="DD-MON-RR"
    0.02: ...Check for session expiration:
    0.02: ...Metadata: Fetch Page, Computation, Process, and Branch
    0.02: Session: Fetch session header information
    0.02: ...Metadata: Fetch page attributes for application 109, page 50
    0.02: ...Validate item page affinity.
    0.02: ...Validate hidden_protected items.
    0.03: ...Check authorization security schemes
    0.03: Session State: Save form items and p_arg_values
    0.03: *...Session State: Save Item "P50_ORACLE_SR_ID" newValue="" "escape_on_input="N"*0.03: *...Session State: Save Item "P50_TIMESTAMP" newValue="26-MAY-09" "escape_on_input="N"*
    0.03: ...Session State: Save "P0_CURRENT_PERSONNEL_ID" - saving same value: "1"
    0.03: ...Session State: Save "P0_OFFSET" - saving same value: "0"
    0.03: ...Session State: Save "P0_ACTIVE_WEEK" - saving same value: "24-MAY-09"
    0.03: Processing point: ON_SUBMIT_BEFORE_COMPUTATION
    0.03: Branch point: BEFORE_COMPUTATION
    0.03: Computation point: AFTER_SUBMIT
    0.03: Tabs: Perform Branching for Tab Requests
    0.03: Branch point: BEFORE_VALIDATION
    0.03: Perform validations:
    0.03: ...Item Not Null Validation: P50_TIMESTAMP
    0.04: Branch point: BEFORE_PROCESSING
    0.04: Processing point: AFTER_SUBMIT
    0.04: ...Process "Get PK": PLSQL (AFTER_SUBMIT) declare function get_pk return varchar2 is begin for c1 in (select ORACLE_SR_SEQ.nextval next_val from dual) loop return c1.next_val; end loop; end; begin :P50_ORACLE_SR_ID := get_pk; end;
    0.04: ...*Session State: Saved Item "P50_ORACLE_SR_ID" New Value="6"*
    0.04: ...Process "Process Row of ORACLE_SR": DML_PROCESS_ROW (AFTER_SUBMIT) #OWNER#:ORACLE_SR:P50_ORACLE_SR_ID:ORACLE_SR_ID|IUD
    0.04: Show ERROR page...
    0.04: Performing rollback...
    ORA-01400: cannot insert NULL into ("CAPACITY"."ORACLE_SR"."TIMESTAMP")
    Unable to process row of table ORACLE_SR.
    Return to application.
    Any thoughts would be appreciated.
    Thank you,
    Justin.

    If you changed the Source Type of an item from Database Column to something else, then it cannot participate in the Automated Row Fetch/Automatic Row Processing (DML) choreography. You should leave the Source Type as it was and change the item's Default Value to populate it when the ARF process fetches a null for the column.
    Scott

  • Need help with session state/item refresh

    I have an application that allows users to record productivity information for our employees. There are different types of work they have to do, so the form is in header/multiple-detail form and uses collections to handle all processing. In the header portion are the fields that record the time of work. Though this is stored in the database as a single field for start of shift and single field for end of shift, in the entry it is split up into 9 fields: 3 for day, month, and year, and three more each for start hours, start minutes, AM/PM, end hours, end minutes, and AM/PM, which I then concatenate to get the dates to store. The update part works fine. When I go in to display each of these, I have to use an SQL query to retrieve only that section of the time.
    The problem I am having is that if the user pulls up several timecards to edit them, it retains these time values from the previous timecard, and due to the way the collections refresh, I can't seem to get either item session state parameter (Only when Null/Always from Source) to achieve the desired result. If I use the Only When Null option, I retain the values from the previous timecard. If I use the Always from Source, the user can't update any of the time-related input.
    Can anyone suggest a solution? I've tried a session state process that fires on entry to clear those items and ran into the same problem as using the Always From Source option. There has got to be a way to handle this, but it's got me stumped and my users are clamoring for a fix.
    Page initial load
    A. Before Header process populates job collection and other collection (not header info), which comes straight from DB table.
    B. Data displays for Header (from table) and two detail sections (from collections)
    User presses Submit to save changes
    1. On Submit Before Processing: updates job and other collections (to preserve changes in case validation fails)
    2. Validations check to make sure job codes are valid, date is valid, employee is valid, etc.
    3. On Submit After Processing: Writes changes to header from input form, writes changes to job and other from collections to appropriate DB tables
    I also have two On Submit After Processing processes to add blank lines - one for each collection. These are triggered via buttons.

    Blair:
    Does creating a 'before header' process to populate these fields make a difference ? The sql could be something like
    select TO_CHAR(TC_START_TIME,'HH') into :P1115_TIME_IN_HH from TC where TC_ID = :P1115_TC_ID;You should set the 'Source Used' back to 'Only when current value in session is null' and the 'Source Type' to 'Static Assignment(....)' and clear out the 'Source value or expression' field.
    varad

  • Session state consistency - how does APEX keep session state across pages

    I would like to know how the APEX develper tool keeps session state from being overwritten across mutiltple pages in the same Session. Because this is difficult to explain I'll use an example from withing the APEX dev tool
    For Example:
    1. I navigate to the page (4150) thet allows me to edit my Page 880 [Window 1]
    2. I now do a Cntrl^N to Open a New Window in the same session (this opens on the same Page 880 in the new window) [Window 2].
    3. In Window 1, I click an item to update ie I want to put a comment on the Unconditional Branch so click this to go to the Update page. I see the F4000_P4313_ID is passed in the URL (ie the context, UID of the Branch).
    4. In Window 2, I change the page to 881 - ie this is overwriting my Session State variables for page 880 with page 881.
    5. I click an item in Page 881 to update ie I want to put a comment on the Unconditional Branch so click this to go to the Update page. I see the F4000_P4313_ID is passed in the URL (ie the context, teh UID of the Branch).
    6. In Window 1 (the Page 880), I add a comment to the Branch and 'Apply' changes. On returning to the Page the context has changed from 880 to 881 (as expected as Window 2 had overwritten the session state). Slightly confusing for the user as they did go from Page 880 not 881 but ok
    What intrigues me is how the Edit Branch page applied the update to the correct branch [good !]. Why weren't the Branch Session state variables (ie the Branch for Page 880) overwritten with the Branch Session state variables for the Branch from Page 881 ?
    Both navigations go to the same Page passing the UID of the branch, hence I would of thought the last navigation is the one that would be persisting (ie from Page 881 Window) ?
    Any tips on preventing users updating the wrong record because of the Session State being overwritten would be most welcome.
    Look forward to hearing from you.

    Let me take a shot at explaining this.
    Session state is stored in Oracle database tables. When a APEX page is rendered, those tables are read and the HTML is sent to the browser. When that page is submitted, all the HTML form inputs on the page are saved back into session state over-writing any existing values for that session
    So, in your example, since Page 4313 has the hidden page item (the "GUID" of the branch), it doesn't matter if any other window has the same page open with some other GUID. Each page is a self-contained "unit" which has all the information necessary to properly process that page when it is submitted.
    Think of it this way...in your example, when you have windows 1 and 2 open (window 2 was opened after window 1), go back to Window 1 and click the browser's Reload/Refresh button. Instead of refreshing the same page (branch 9000000), you will find that it will load branch 8000000! This is because session state is read from the database and when Window 2 was rendered, it has set F4000_P4313_ID in session state to 8000000.
    Hope this helps.

  • Session State Protection Violation error

    I am developing my first Apex application. I have this page which has been running fine until I made some changes. The error I get is the following:
    -----Error message:
    Session state protection violation. This may be caused by manual alteration of a URL containing a checksum or by using a link with an incorrect or missing checksum. If you are unsure what caused this error, please contact the application administrator for assistance.
    --End of error message.
    This happens Whenever the page is submitted for process, e.g. when I select from a "LOV with Submit" item or when I click the "Save Changes" button. It is fine if the button redirects to another page. Using Debug, I saw that the error occurs right after "Fetch page attributes" and before "Fetch session state from database".
    About the changes I made before this error first surfaced: nothing to do with session state protection and nothing I can think of that is related to session state protection. In fact, I did not specify any session state protection at any level at this stage. That is, all pages and items are unrestricted. I did add a javascript to the page which is invoked onChange of an item to update another item. I made the same changes (except for the Javascript) to another similar page which is still running fine.
    I tried logging out of Apex (I am using OracleXE) and getting back on, the error still persists. I even shut down and restart the Apex database to no avail.
    Can anyone point me to where it might be the cause of this problem? Thank your help and/or suggestions in advance.
    Message was edited by:
    muighi

    Scott - I should have posted this question sooner! I wasted a whole day trying to figure this out. Thanks a lot, Scott. By the way, where can I find any documented known bugs in Apex?
    --Candy                                                                                                                                                                                                                                                                                                                                                                                                               

  • 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

  • Session state value translation issue

    Hello.
    New to APEX and not all that web-savvy. Using version 3.1.2.00.02.
    Little background:
    I have a Select List item, "P1_OPERATOR", working from an LOV of relational operators (=, >, >=, <, <=). I use this item as a string substitute in report queries. This works fine for any reports on the page containing the "P1_OPERATOR" definition itself, "PAGE_1".
    Problem:
    However, when I attempt to set a session state value for a similar item ("P2_OPERATOR") on "PAGE_2" to the value of P1_OPERATOR using the column link of a report on PAGE_1, the value of P1_OPERATOR does not translate correctly for any values involving a right or left angle bracket (it works only for '=').
    Scenario:
    Let's say I'm on PAGE_1 and I select >=. The reports on that page display as expected. When I click on the link to PAGE 2, the reports there display "invalid relational operator". When I view session state from PAGE_2, I can see that...
    P1_OPERATOR is '>='
    P2_OPERATOR is '& gt;=' (space added to get it to display on this post).
    So it's trying to use the html value for >= as a literal value.
    I can also see that APEX has built the URL for the link page as follows...
    (abbreviated) http://...:P2_OPERATOR,P2_DATE:%26gt%3B%3D%2C2009-06-27
    If I type in the expected literal URL myself (outside of APEX) as...
    (abbreviated) http://...:P2_OPERATOR,P2_DATE:>=,2009-06-27
    ...or even the expected hex URL (outside of APEX) as...
    (abbreviated) http://...:P2_OPERATOR,P2_DATE:%5C%3E%3D%5C%2C2009-06-27
    ...PAGE_2 shows the expected results.
    Is there a way to solve this translation problem? Some workaround I haven't thought of?
    Thanks for your help.
    Edited by: user11313762 on Jun 29, 2009 2:30 PM

    Use an PL/SQL process On Load - Before Header with the following:-
    *:P2_OPERATOR := :P1_OPERATOR;*
    You'll have to use a hidden item as your condition (having looked at a page debug, any request value will have expired by the time the process will fire).
    create a hidden item on page 2 called P2_SET_OP
    use Item = value type of condition in your process where exp1 = P2_SET_OP (don't use colon notation here as ITEM has been specified) and exp 2 = Y
    You can even reset P2_SET_OP back to null in the same process as you assighn the operator.
    *:P2_OPERATOR := :P1_OPERATOR;*
    *:P2_SET_OP := NULL;*
    set the value of P2_SET_OP in your link as P2_SET_OP:Y
    Gus..

  • Referencing session state across DBLinks

    I have a central security package that all applications access to provide item-level authorisation.
    Recent extensions to the security model require additional information from the application, held in Application Items.
    For various legacy reasons I want to avoid having to add additional parameters to the security functions called so I reference the application items via the V() function. This works perfectly on local applications (within the same database) but V() returns null values if the application is accessing the security function via a DB link.
    So, is there any way to access session state from a PL/SQL package of an application that is not running on the same database?
    Regards
    Richard

    Richard
    Something along these lines might work. Say the remote package is named 'sec var'. At the remote db create 'sec_vas' as follows. create or replace package sec_vars is
    var1 varchar2(100);   // new items needed by auth fn
    var2 varchar2(100); 
    procedure setval (var1 in varchar2,var2 in varchar2);  //sets var1/var2  with values from session state   
    function getval (var in varchar2)  return varchar2;   // the local 'v' fn
    function doAuth() return boolean;
    end;
    create or replace package body sec_vars is
    procedure setval (var1 in varchar2,var2 in varchar2) is
    begin
    sec_vars.var1:='Variable 1';
    sec_vars.var2 := 'variable 2';
    end;
    function getval (var in varchar2)  return varchar2 is
    begin
    if upper(var)='VAR1' then
       return sec_vars.var1;
    elsif  upper(var)='VAR2' then
        return sec_vars.var2;
    else
        return null;
    end if;
    end;
    function doAuth() return boolean is
    begin
    select count(*) from emp where ename=sec_vars.get_val('VAR1'');
    return true;
    end;
    end;And in the Apex db we do something like create synonym sec_vars for sec_vars@remote_db;
    // an auth process
    begin
    sec_vars.setval ('Variable 1','variable 2'); // set required session item values
    sec_vars.do_auth();
    end;varad

Maybe you are looking for

  • Line after item in table ?

    In my smartform , I have a table that prints line items...I need to add a line after each line item to seperate them ...how can i get that ? I tried adding a text element after the item ....but i cant get the line to span the entire table width ?

  • Is the batery of 12" g4 iBook ever under warranty?

    My daughter's iBook purchased last October developed a non-charging issue. First it would charge part way and then none. The Genius's first replaced the power cord, then the power adapter, and finally the motherboard. Now after being at Apple for 2 w

  • Envelop header for HTTP receiver adapter

    Hi, In one of the business scenario's XI has to send data to an external party using an envelope header(Sample document to be sent is given below.) <b>Message-ID:ABC.JavaMail.SYSTEM@ztxwmwspro02 Date: Thu, 16 Oct 2003 17:02:04 -0400 (EDT) Mime-Versio

  • Best way to move data between instances

    I currently have a procedure that updates our data tables between instances... I would normally do a clone but since developers use this instance to do their work in, it's not a viable option. The past few times, I've scheduled the procedure to run v

  • Favorites in BEx Analyzer

    Hello everyone! We work with BW 3.0B and GUI 6.40. Is there a possibility to organize the favorites in BEx Analyzer? I would like to create some subfolders. thx for your help rgds Adi