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

Similar Messages

  • Need help with the session state value items.

    I need help with the session state value items.
    Trigger is created (on After delete, insert action) on table A.
    When insert in table B at least one row, then trigger update value to 'Y'
    in table A.
    When delete all rows from a table B,, then trigger update value to 'N'
    in table A.
    In detail report changes are visible, but the trigger replacement value is not set in session value.
    How can I implement this?

    You'll have to create a process which runs after your database update process that does a query and loads the result into your page item.
    For example
    SELECT YN_COLUMN
    FROM My_TABLE
    INTO My_Page_Item
    WHERE Key_value = My_Page_Item_Holding_Key_ValueThe DML process will only return key values after updating, such as an ID primary key updated by a sequence in a trigger.
    If the value is showing in a report, make sure the report refreshes on reload of the page.
    Edited by: Bob37 on Dec 6, 2011 10:36 AM

  • Custom Tabular form - Session state values disappear

    Hi,
    I have a custom tabular form page using apex_item and apex_collections. I am using the apex_collection to store the values in memory in order to avoid the data loss in session state. The page is working fine after a validation failure and it shows the values on the second report (as advised for custom tabular forms).
    In this, some of the rows have clob value which needs to be edit on a rich text editor. Since apex_item does not provide a solution to have rich text editor, I have to branch to another page on an Edit link for the CLOB data using a modal window. However When I return back from the modal page, the values disappear from session state, and the validation (using htmldb_application.g_fxx arrays) does not take place.
    Is there any workaround to overcome this issue?
    Apex version: 4.1
    Thanks in advance.
    Natarajan

    Thanks Daniel for your reply.
    Actually its an interface with a custom tabular form on page 1 with apex collections and rich text editor on page 2. Since it is not possible to have the rich text editor, I need to have it in another page (I could have it the same page, that is the way I am trying now) however I open the next page as a modal window.
    I have a link on the tabular form, so that the clob content is opened in the rich text editor on the next page. After the edit, I update it to the same collection and go back to the tabular form page and refreshes the report. It works fine, but causes trouble to the data entered on the other columns in the custom tabular form.
    I have now deviated to another work and put this on a hold. If my explanation is still not clear, I will create the same page in apex.com to simulate the error.
    Thanks again.
    Natarajan
    Edited by: Nattu on Mar 14, 2012 11:35 PM

  • Session State Values Only Used After a Page Refresh

    We recently moved our application to use Oracle Application Server. I don't know if this is an issue but I thought it might be relevant to my question.
    In this application there is report that has a link to another page. This link sets the ID of the company that the subsequent pages use to provide several summarized reports with drill downs. I'll call this the main page.
    Users recently started to report that when they drill into the details and use the breadcrumbs to get back to the main page, that page will display the wrong company, one they were viewing recently.
    In testing I find that when I click a link to drill down into the details the details page is not for the right company. I check session state and the value of the ID is correct. If I refresh the page I then get the correct drill down page. Some of the drill down reports will pass a page specific ID into each page and others will just reference the ID from the main page. Not sure if this is relevant since the breadcrumbs to go back to the main page would not be able to use every possible page specific ID, my understanding was that once I set the ID in session state on the main page I could rely on it.
    Also if I get the wrong details page and click on the breadcrumb to the main page I get the wrong main page (it displays a previously viewed company). Again the session value is correct and a refresh of the page will bring back the right company.
    Our systems admin was asked to check if we had WebCache on and she said it was not. Is there something else that could be caching the results of these pages?
    Thanks,
    Greg

    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

  • 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

  • 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

  • Displaying session state value in XSL-FO

    Hi
    I'm new to the area of generating PDF documents using Apache FOP with XSL-FO.
    I have an 10.2.0.3 instance with Apex4, and I would like to know how to display, for instance, the username or a page item within the report.
    This is how I'm referring to elements in my query:
    <fo:table-cell>
    <fo:block><xsl:value-of select="LIST_PRICE"/></fo:block>
    </fo:table-cell>
    But I would also like to display the value of APP_USER, or a page item - and I'm unsure of the syntax. All the XSL websites are great, but don't really help in the case of Apex variables.
    Thanks.
    ScottWe

    While I've made progress on this, I still can't see the results - even though the theory is sound.
    I was reminded that the XSL is just referring to whatever is in the XML.
    So I ensured that the report includes application and session information; I've included a hidden item on the page that is computed on entry, and I can see the (unpopulated) XML element when I download the XML.
    However when I run the report from the page, the item is still empty when I try to refer to it like this:
    <xsl:value-of select="P6_DEMO"/>
    Should I be referring to it differently?
    Cheers

  • Session state values

    I have two pages.The first page branches to the second page when the submit button is clicked.The first page has a text item.I am able to set the item value in the session but not able to set it to a text item in the second page when the page loads after submit.
    Pls some one help me.

    You need to make sure that no other page processes are causing that item to 'lose' it's value in the page rendering process. The item itself might be set to 'Always replace current value', which would cause what you're seeing.
    Earl

  • How to keep up the session state values uncleared after page submit

    hi,
    i am using Application Express 4.0.2.00.07
    and 11g
    i have created a tabular form manually useing apex_items.
    select apex_item.checkbox(1,null) as "check",
           APEX_ITEM.DISPLAY_AND_SAVE(4,line_item_no) as "Line Item No",
           APEX_ITEM.DISPLAY_AND_SAVE(5,line_item) as "line item",
           APEX_ITEM.text(6,module) as "Modulle",
           rstag as "RS tag",
           *apex_item.text(2,null) as "FS Name"*,      --"fsname" and "fstag" are not columns of this table(pli)
           *apex_item.text(3,null) as "FS Tag"*
    from pli where pid = :P17_PID
    order by line_item_no deschere on submit, data gets inserted into the another table(fli),(whixh contains all these columns)
    after the page is submitted it returns to same page,
    i want the apex_items's text fields to retain the submitted values after returning to the same page
    can you tell me how to achieve this.
    thanks,
    Little Foot

    hi,
    can you help me to use this collections,
    i have created a collection processdeclare 
      la_cks wwv_flow_global.vc_arr2;
    begin
      htmldb_collection.create_or_truncate_collection('UPDATEE');
      htmldb_collection.create_or_truncate_collection('INSERTT');
      for i in 1..htmldb_application.g_f01.count
      loop
        if htmldb_application.g_f01(i) is not null then
          htmldb_collection.add_member(
              p_collection_name => 'UPDATEE',
              p_c001            => htmldb_application.g_f01(i),
              p_c002            => htmldb_application.g_f02(i),
              p_c003            => htmldb_application.g_f03(i),
              p_c004            => htmldb_application.g_f04(i),
              p_c005            => htmldb_application.g_f06(i),
              p_c006            => htmldb_application.g_f07(i),
              p_c007            => htmldb_application.g_f08(i),
              p_c008            => htmldb_application.g_f09(i));
        else
          htmldb_collection.add_member(
              p_collection_name => 'INSERTT',
              p_c001            => htmldb_application.g_f01(i),
              p_c002            => htmldb_application.g_f02(i),
              p_c003            => htmldb_application.g_f03(i),
              p_c004            => htmldb_application.g_f04(i),
              p_c005            => htmldb_application.g_f06(i),
              p_c006            => htmldb_application.g_f07(i),
              p_c007            => htmldb_application.g_f08(i),
              p_c008            => htmldb_application.g_f09(i));
        end if;
      end loop;
    end;            then when creating a report on collections i am unable to proceed,
    in sql report i used select apex_item.checkbox(1,null) as "check",
           APEX_ITEM.DISPLAY_AND_SAVE(4,line_item_no) as "Line Item No",
           APEX_ITEM.DISPLAY_AND_SAVE(5,line_item) as "line item",
           APEX_ITEM.text(6,module) as "Modulle",
           nvl(rstag,APEX_ITEM.text(7,null)) as "RS tag",
           apex_item.text(2,'klklk',null,null,' readonly="readonly" ') as "FS Name",
           apex_item.text(3,null) as "FS Tag"
          from htmldb_collections
    where collection_name = 'UPDATEE'says rstag invalid indentifier...,
    can you tell me how to use this collections to achieve my purpose.
    i tried http://www.oracle.com/technetwork/developer-tools/apex/tabular-form-090805.html
    so i need to use collections in this way only...!
    can i make collections to just collect values from two columns and then put those values to the respective rows in their columns...!!!
    guide me to achieve my requirement.
    Thanks,
    Little Foot
    Edited by: Little Foot on May 10, 2011 5:00 AM

  • 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

  • Feature Request - show substitution string values in session state display

    Hi!
    I would like to request that in addition to page and application items and session state values that the value of substitution string values be shown. Another option would be to have a separate link (like session) to display them. This would allow developers to see all of the available substitution values and how they change across pages, etc.
    Thanks!
    Dave Venus

    Dave - What are some examples of values that you are not seeing in the session state report that would be useful?
    Scott

  • Compare Old Value (Session State) with New Value on Submit.

    Hi all,
    Is there an easy way to do comparison of Old Value (Session State Value) with the New Value?
    is there an API for that? like what we have in PLSQL Trigger :NEW & :OLD
    Thanks before
    -Joel

    There is only one version of session state available for examination at any point during page rendering or processing, the current version. Can you explain more about what you need?
    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

  • Problem with application item and session state

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

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

  • 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

Maybe you are looking for

  • Open AI in c# in hidden mode

    How can I open adobe illustrator in hidden mode directly from the c# code? Now when I create the new application object with Illustrator.Application illuApp = new Illustrator.Application(); on the screen appears the window application. I can't change

  • Error messages while generating reports

    I am using CR XI SP4 and i get the following message when generating reports: com.crystaldecisions.sdk.occa.report.lib.ReportSDKServerException: Unknown Database Connector Error Error in File D:\Temp\{67475350-F4E8-466A-B1E9-414965812A20}.rpt: Unknow

  • Merge Versus Portfolio Feature in Adobe Pro 9

    I am new to this program and learning as I go. I am in commercial real estate and have a need to send clients spread sheets, word documents, jpegs and pdf files. Instead of sending all of these seperately I want to put all the documents into one file

  • HT3702 I am not able to make a purchase on my iPhone why does it redirect me to go to apple support

    I am having problems purchasing items on my apps and it is redirecting to apple support why is that?

  • Mouse Over Image

    Example Here On this website there is a list of different items. Picture of it and then the name. When you put your mouse over it, an image shows up where the mouse is, that follows the mouse. Is this possible to do in Dreamweaver?