Random page item data corruption

I designed an APEX page for a service request processing application with several date page items. Our database is Oracle 10g. The application is in production and the users have reported that data in some date page items become corrupted randomly. For example, the user enters ’07/04/2011’ in the date page item “Planned Start Date” among other values and submits the page. The date somehow winds up ‘07/04/0011’ that is, year 11. (A corrupt date increases the risk that these transactions will not be processed in a timely manner and will negatively impact the level of customer service the user wishes to provide.)
I have identified three possible areas that may hold the key to underlying cause: 1) page item edit mask, 2) page process(es), 3) DB column constraints. Inasmuch as this is a random problem and has affected a handful of rows it may not be possible to trace the logic as the pages are processed. Has anyone encountered this problem and can suggest a possible remedy? For the sake of clarity I placed the setups for the affected page item below.
Selected setups for P14_PLANNED_START_DATE, all unlisted attributes are blank or null:
Settings - Value Required: No; Format Mask: MM/DD/YYYY; Show: on icon click; Show Other Months: No; Navigation List for: None
Source - Source Used: Always, replacing any existing value in session state; Source Type: Database Column; Maintain Session State: Per session; Source Value or Expression: PLANNED_START_DATE
Default - Default Value: to_char(sysdate, ‘MM/DD/YYYY’); Default Value Type: PL/SQL Expression
Sample page processes are:
Validation - Name: P14_PLANNED_START_DATE not null; Type: Item specified is not null; Validation expression: P14_PLANNED_START_DATE; Always execute: No
Conditions – Condition Type: SQL Expression; Expression 1: :REQUEST IN (‘SAVE’, ‘CREATE’)
Validation – Name: P14_PLANNED_STARTEND_OKAY; Type: Function Returning Boolean:
Validation Expression:
IF SIGN(to_date(to_char(to_date(:P14_PLANNED_START_DATE,'MM/DD/YYYY'),'YYYYMMDD-') || :P14_PLANNED_END_TIME,'YYYYMMDD-HH:MI AM')
- to_date(to_char(to_date(:P14_PLANNED_START_DATE,'MM/DD/YYYY'),'YYYYMMDD-') || :P14_PLANNED_START_TIME,'YYYYMMDD-HH:MI AM')) > 0
THEN RETURN TRUE;
ELSE
RETURN FALSE;
END IF;
Conditions – Condition Type: PL/SQL Function body returning Boolean
Expression 1:
IF :REQUEST IN ('SAVE','CREATE') THEN
IF (:P14_PLANNED_START_TIME IS NULL OR :P14_PLANNED_END_TIME IS NULL)
THEN RETURN FALSE;
ELSE RETURN TRUE;
END IF;
ELSE RETURN FALSE;
END IF;
Database: The attributes for the database column are
Column Name: PLANNED_START_DATE
Data Type: DATE
Nullable: No

Ligon,
You're right to think this is pretty laborious stuff. A co-worker wanted to do the same, to make sure users didn't lose a change when clicking Cancel. I suggested he look at calculating the query checksum before and after, which he tried. But it got very cumbersome very fast and he ended up dropping the idea. He's fairly new with Apex, but he's also a quick study, so it's not like he's a novice coder.
I don't have his implementation details anymore to even share with you.
Sorry I couldn't be more help.
Good luck,
Stew

Similar Messages

  • How to pass the page item data from tabA to TabB of a discoverer report

    I have a discoverer repoort, it is master_detail (Dept-Emp) report
    TabA is a master worksheet, which has a page item Deptno
    (the data is from a customized query)
    TabB is detail report which has a Deptno as the page item
    which show the emp detail info on this deptno
    (the date is from another customized query).
    What I want to do is;
    When I change the Deptno in TabA, TabB should automatically change to the deptno of Tab A when I click TabB.
    How can I pass the page item deptno from TabA to page item of TabB?
    Thanks for your help

    Hi.
    You are absolutely right, you cannot create a link from Page Item.
    My Idea was (and I'm sorry taht I didn't mention it at the beginning) to create one link for each and every column in the report in the TabA.
    All these links would be exactly same and pass the Deptno to the TabB.
    So the end user can click wherever he wants (all cells on the worksheets have the link to the TabB) and he is always redirected to the TabB with the Department parameter seted to Deptno Page Item from TabA.
    As I already said before, it is not exactly what you expected, but it's probably the best you can get out of Plus.
    Jakub

  • Page item (date picker)

    I have added a date picker to my report . and in the report source I've added a where clause to filter the report as per the selected date(which is one of the columns in the table) but there is nothing shown.
    where DATE =:P23_DATE
    when I remove the where clause all the records appear and when I return it ..nothing there.
    can someone help me?
    Edited by: Beena-IT on May 4, 2013 7:19 AM

    You have data, that's good. You've isolated the problem to what seems to be the WHERE clause, good. The WHERE clause is simple, good. So, it would seem DATE NOT = :P23_DATE for your query.
    Remember -- or note, if you didn't know this -- page items are (always?, mostly) character strings. As Jeff intimates, if DATE is a date, you will get implicit date conversion in your WHERE clause. (BTW, isn't DATE a Reserved Word?) May I suggest trying "DATE = TO_DATE(:P23_DATE,'your date format here')" to make it an explicit conversion?
    Also, I recommend running any query you are having a problem with in the APEX SQL Commands window. Then you can immediately see what APEX is returning for your query. It helps my debugging a lot.
    Regards,
    Howard

  • Line item data does not appear on all master pages - Adobe forms

    Hi Guys,
    I have a problem in Adobe forms as explained below-
    I have a page in the form which has, you can say, a 2 windows or subforms (  Information window/subfirm on top right corner, main on middle of the page ). The data of the main subform is a line item data of delivery. Some parts of the same data need to be printed on the Information subform also. The main subform can overflow  to next pages but the information window will have only very limited data to be printed on one page itself, meaning it does not overflow.
    Now the requirement is that  each line item should be printed on a new page. For example if there are 2 lines items then first line item should be printed on first page. Then there will be a conditional page break and the next line item will be printed on the next page ( I have achieved this using condition page break). The information window will contain information related to corresponding line items. If the first line item data overflows in main then information window of first line item should be printed on first and 2nd page. The second line item should start printing on 3rd page and information window of  3rd page will contain data of 2nd line item.
    I created 1 body page and 1 master page. I created one internal table with data of main window and information window. I put the information window on master page to make it appear on all the pages. 
    This solution unfortunately does not work. The issue is that in case of overflow, 1st page information window shows first line item. 2nd pages shows 2nd line item and 3rd page is blank whereas ideally 1st and 2nd page information window should show first line item and 3rd page should show 2nd line item. This means that master page and body page are not getting linked. If I create the information window on body page itself, it does not repeat on all the pages. Please provide some inputs to resolve the issue.
    Thanks
    Abhi

    Hi Abhinav,
        I am also trying to solve the similar issue. Need to print the internal table data in the Master page.
      Have you resolved this issue. Can you Please share your solution .
    Thanks
    Swarna.

  • Refresh only page item while submitting data from the popup window

    Hi All,
    I'm pretty new to Apex .....
    I have a form with text items as first few entries and then a radio button list and few text items again. On selecting certain radio button I have a popup window which acts as an interface for the next text item in the calling page. The purpose of having the popup window is that the text item following the radio button takes the input with certain character delimiters along with the data. Instead of using delimiters while entering the data I want a meaningful data to be keyed in the popup window and all the string operation to be done as a background process. I have been successful this far. I'm using the below javascript on click of the submit button.
    javascript:doSubmit();
    window.opener.doSubmit('REFRESH');
    window.close();
    On doing this I'm losing the values submitted for the items prior to the radio button(including radio button). Please note, I have a dynamic action set on page load to reset the values. Is it possible to refresh just the page item from the popup window.
    Also, I tried excluding the window.opener.doSubmit('REFRESH'); from the above javascript. It sets the item with the expected value (viewed it in the session items, however I would like to view the concatenated string on my calling page) but following this there is an insert operation which uses all the necessary items in the form. All values except the value returned from the popup window is populated into the table. Am I missing something.
    Any help in this regard is appreciated.
    Thank you!!!
    Regards,
    Ganesh

    Value set using Javascript is only in your browser page but is not yet available in the session. This is why the report doesn't return the expected output.
    Before refreshing the report you would need to set the session state of this item.
    You can set it after you assign the item a new value or before the report is refreshed
    For Interactive Reports, this is available built in
    you can go to Report Attributes >Advanced Attributes -> Page Items to Submit and specify P2_X1 for the field(and any other page item that the report is dependent on)
    For standard reports, you can create a Dynamic Action that is triggered "before refresh" of the report's region, and choose PLSQL as the action types, give a dummy BEGIN NULL END; for the code and specify this item name in the page item to submit field so that it sets the items's value in session.

  • Reset data picker page item by selection page item in Apex

    Hi,
    Need to create a report based on date ranges and for this created a interactive report and two page item datepicker fields P15_fromdate and p15_todate. Report works fine with this criteria.But user wants one more field quarter(P15_quarter), When they select the quarter the range values has to get reset and as to get applied to report.
    Issue here is unable to find a way to set the page range item values based on the quarter field selection
    Need help how to reset the page item fields.
    Thanks in advance.
    Thanks,
    Sandeep

    Ligon,
    You're right to think this is pretty laborious stuff. A co-worker wanted to do the same, to make sure users didn't lose a change when clicking Cancel. I suggested he look at calculating the query checksum before and after, which he tried. But it got very cumbersome very fast and he ended up dropping the idea. He's fairly new with Apex, but he's also a quick study, so it's not like he's a novice coder.
    I don't have his implementation details anymore to even share with you.
    Sorry I couldn't be more help.
    Good luck,
    Stew

  • Label is not printing in 5 th page and item data appering before the morgin

    Hi friends,
    In script. All pages comming prperly.. but  last page the labels are not prining and item data is printing upside the morgin only.. what is the problem?.. All pages its comming properly...except last page..
    if soem body knows .. please help me..

    I agree with Shiva Kumar - most likely there is no such field in it_afpo. A few more suggestions though:
    1) Do not post large pieces of code here - if you have a question about a particular SELECT statement, post only that statement and relevant data definitions. No one is going to read your whole program  anyway - we have work to do too.
    2) Your JOIN is way too big and would be difficult to analyze if anything goes wrong. You might want to start with smaller SELECTs and, when you're sure everything is working correctly, then combine them into one. Also huge JOINT is not necessarily more efficient.
    3) You don't have to use aliases "AS a... AS b", etc. Instead, just use the table name, e.g. AFKO... AFPO... .It is much easier to read this way. The aliases are needed only if you're joining the same table more than once. Also they're not limited to one letter either.

  • Page Item with Date format DD-MON-RR - APEX 32

    Hello,
    I am passing date parameter but somehow it is not formatting date properly on calendars.
    For e.g.
    Below is my calendar query
    select distinct count(*) knt, initcap(username) username, to_date(to_char(trunc(timestamp),'DD-MON-RR'),'DD-MON-RR') ts from xrx_master_records
    group by initcap(username), trunc(timestamp)In above query TS is the date column that results in DD-MON-RR format.
    Then I format column on calendar tab as shown below, here is how I am constructing the link.
    <!-- <a href="f?p=&APP_ID.:40:&APP_SESSION.::NO::P40_CAL:#USERNAME#:P40_DAILY_DATE:#TS#"
    style="color:NavyBlue;
    font-weight:bold">#USERNAME#(#KNT#) </a> -->But the issue is - #TS# field shows complete date with time stamp for page item P40_DAILY_DATE. i.e. instead of 21-JUL-10, it shows 21-JUL-2010 12:00:00 AM. That means, it is ignoring calendar query and reads straight from database.
    How can I make sure that P40_DAILY_DATE item receives date in DD-MON-RR format?
    Then, I plan to use P40_DAILY_DATE to connect with the report region by comparing timestamp column from same table with P40_DAILY_DATE.
    Please advice.
    Thanks,
    R

    Sorry but, I am expecting a more productive feedback than this.
    Let me state the obvious that, this forum is the community of SME who are volunteers. It is the precious help they provide with their insight to questions other members have. Due to the simple fact that it is purely a matter of choice whether to reply questions or not, it is perfectly justified that some of questions remain unanswered. I hope you understand this.
    And anyway, what makes you think that those question that remain unanswered on this forum, remain open forever?

  • Viewer slow while retrieving data while changing value from a page item

    Hi, I am using 9.0.2 to create reports. My end-users are using Viewer to run these reports. Recently, we are experiencing performance problems with Viewer. We have reports with Page Item. Let say a report takes 1 min to run. After running the report if a different value is selected for a page item, it is takes another 1 min to get new data. Whereas, Desktop is not taking any additional time (noticable) for a different value for the page item. Recently, we are experiencing this problem. I thought that it was cache problem in Application server, so we restarted all the pieces in aps server. However, the problem still exists. We are using a materialized for this particular report.
    Any tips would be highly appreciated. Thanks.

    The performance differences can be attributed to the differences in product. Desktop is a client server product. A query executes and ALL data is returned to the desktop. You can manipulate that data in any way and the database is not required. Web (Plus/Viewer) only return the data needed to satisfy the query currently being viewed. If you change a page item, a database call is made to retreive additional/different data.
    In other words this is just how things work. You can alter settings in your prefs.txt file to improve performance in Viewer/Plus. Changing number of rows returned, memory settings, row fetch limits, rows per fetch all can improve/reduce performance.
    As best I know there is not a "magic" setting for these values. It is based on the server/volume of data/workbook content/ workbook layout. etc. Crosstab workbooks are much slower to return data than page -detail.

  • Max Date in Page item

    Has anyone figured out how to get a date field to default to max date when used as a page item. I have select max(timestamp), create an item timetwo that -= max(timestamp), you name it we have abused and used it. Nothing seems to work.. I am sure we are missing the obvious. Any help appreciated.
    Stefan

    Has anyone figured out how to get a date field to default to max date when used as a page item. I have select max(timestamp), create an item timetwo that -= max(timestamp), you name it we have abused and used it. Nothing seems to work.. I am sure we are missing the obvious. Any help appreciated.
    Stefan

  • Two items data in one page of smartform

    hi friends,
    there are two smartforms i need to display in single page , so here i have two internal tables item data , in one internal table 8 line items and other 12 line items , so these data I need to display in single page using smartforms can u plz sujjest me, points will awarded ,
    with regards,
    prasad

    hi prasad,
    can you please elaborate on your problem.
    do you mean you have 2 header data n corresponding line items or do you have 2 internal tbale data or something else.
    PLease elaborate so that we can help.

  • How to print different  header & item data in new pages using smart forms.

    Hi,
    In smart forms I am trying to print header data & their item data. But there are more than one header data for a given input.
    I want to print all the different header data with their item data in new pages using smart forms. Can any one please help to solve the issue.. Its very urgent for me..
    Regards,
    Brajesh

    Hi
    U need to use control break statements to acheive ur requirement.
    Regards,
    Priya

  • Fetching extended item data in seccond page

    Dear friends,
    I have design the adobe form in ECC 6.0 and the form contains two pages.
    First page contains the header data and Item data, if the first page is not enough to fit the item data it should print in seccond page.
    Here I am unble to fetch the data to seccond page even after proper baind also. Please help me.
    regards
    Sudheer

    Hi
    Create another page called second page and create a command in your first page main window in command check go to next page:second page.
    Now in second page create main window which is of same width, height, size as first page main window.
    This works
    Swetha

  • Selected page item has no data

    1) After I create the new data model, and start the EP_LOAD_MAIN how can I see the sales history table in the colaborator workbench? I only see the hierarchy of levels ,and in the right of the page, I have the message "Selected page item has no data" and an empty graphic background. Is there something with the Analytical Engine?
    2) There are several errors in the Engine Administrator after i start it:
    08:59:51:234 ERROR INSERT INTO SQL_DEF (COMMENTT, LINE_NO, SQL_ID, SQL_TEXT) VALUES ('Aggri Level 201',1,201,'SELECT min(sales_date) datett, round(NVL (sum(#quantity#),sum(#fore#))')
    08:59:51:234 ERROR - ErrorDescription: ORA-00001: unique constraint (DEMANTRA.SQLD_PK) violated
    In the PL/SQL developer the SQLD_PK doesn't exist

    Hi DCRO,
    1) After I create the new data model, and start the EP_LOAD_MAIN how can I see the sales history table in the colaborator workbench? I only see the hierarchy of levels ,and in the right of the page, I have the message "Selected page item has no data" and an empty graphic background. Is there something with the Analytical Engine?
    I am assuming that before starting EP_LOAD_MAIN, data is present in the staging tables (T_SRC_XXX). So once EP LoAD MAIN completes data should be available in Items, Location and Sales_data tables. Then whenever you try viewing data on the worksheet through the collaborator Workbench (Contains links of the worksheets) based on the aggregation levels(item,location and time) selected in the worksheet definition, the data is displayed on the right side of the worksheet.So in your case, check for the levels and the members under the levels that have been selected in the worksheet. Analytical engine is for generation of forecast (either by Batch / Simulation / Other profiles) and has got nothing to do with the empty graphical background of the worksheet.
    2) There are several errors in the Engine Administrator after i start it:
    08:59:51:234 ERROR INSERT INTO SQL_DEF (COMMENTT, LINE_NO, SQL_ID, SQL_TEXT) VALUES ('Aggri Level 201',1,201,'SELECT min(sales_date) datett, round(NVL (sum(#quantity#),sum(#fore#))')
    08:59:51:234 ERROR - ErrorDescription: ORA-00001: unique constraint (DEMANTRA.SQLD_PK) violated
    In the PL/SQL developer the SQLD_PK doesn't exist
    The error message itself points to some Constraint violation in the procedure. Check the procedures that have errors after the rebuilding of Data model. Recompile them and then try running the Engine Administrator.
    Also, I would suggest you to go through the Oracle Discussion Forums FAQ so that your queries are answered effectively and efficiently.
    Thanks and regards,
    Shekhar

  • Restricting the item data for two pages if data is more then cutoff

    Hi Expers,
    I have one requirement that i need to restrict item data upto two pages .If more data is vailabe even pritning after two pages then data should cutoff(means we don't want to print that extra  data in the next pages ).Could you please explain  how can we achive this in main window ?Can we achive this even using secondary window also?Thanks for your help in advance.
    Thanks and Regards,
    Venkat

    Dear experts,
    For restricting the data up to two pages in the mainwondow ,I have written the condition SFSY-PAGE LE 2.But still i am getting more than two pages means entire data.Can any one explains why this condition is failed(My main window is in the first page itself).
    Many thanks for your help,
    venkat

Maybe you are looking for