Dynamically set data field as visible/invisible....

Hi,
Assume that i have a table like the following:
id varchar2(10),
val0 number(10,2),
val1 number(10,2),
val2 number(10,2)
where the id is the primary key and the other three columns are the values of each year (the current , current+1 , current+2 respectively).
I consider to use a parameter - in parameter form , where the user would select one year and afterwards the report would display only the appropriate value field - that is , the column val0 (for the current).. e.t.c.....
Is the above achievable....????
Note : I use Dev2000 v.6i
Thanks, a lot
Sim

Hi,
you can use a single field referencing for example val0. Then write a format trigger for this field with something like:
if :my_param = 'year + 1' then
srw.set_field(0,:val1);
elsif :my_param = 'year + 2' then ....
As other possibility use for every column a field a write a format trigger to every field depending your parameter.
regards
Rainer

Similar Messages

  • Dynamically Set date not changing in schedule Job

    Hi,
    I have created a report with "Order Date" as one of the parameters on the selection screen. I have created a variant, say 'X' , to set this date parameter dynamiccaly as "Current date - 31 days".
    I have scheduled this program to run in background with the 'X' variant daily at certain time.
    Now, for the day on which I created this job , the Order Date is set to correct date . For ex if I am scheduling the job tdy it will be set to 06/10/08. However, for next day , that is tom this date is not getting changed. i.e Tommorrow again Order date is 06/10/08 but it should have been 07/10/08.
    So basically this dynamically set date is not chaning in the scheduled job.
    Any idea why this is happening and what is the corrective measure for this.
    Thanks!

    There is an INITIALIZATION event in the program.......
    Do the processing your date in that event only....
    for ex....
    select-options: date for order-date.
    INITIALIZATION.
    date-low = sy-datum or wat ever.
    Thanks
    Saurabh

  • Cannot toggle field between visible & invisible

    There is a defect with Designer's scripting that prevents toggling a numberic calculated field between being visible and invisible. Here is a sample calculated field script that reproduces the problem:
    if (fieldOne.rawValue > 0)
    this.rawValue = fieldOne.rawValue * fieldTwo.rawValue;
    this.presence = "visible";
    else
    this.presence = "invisible";
    this.rawValue = 0;
    Note that the same defect is present when using an equivilent FormCalc script.

    I tried your script on a form in Designer 7.1 which I previewed as an Acrobat 7.0.5 Dynamic PDF. While I didn't have problems with the script toggling the presence of the field, the product field's value would always remain zero (0).
    Then I modified the script to be as follows (in JavaScript):
    if (fieldOne.rawValue > 0)
      if (this.presence != "visible")
        this.presence = "visible";
      this.rawValue = fieldOne.rawValue * fieldTwo.rawValue;
    else
      if (this.presence != "invisible")
        this.presence = "invisible";
      this.rawValue = 0;
    Using this script, everything worked fine: Both the toggling of the presence of the product field as well as its calculated number.
    This made me wonder if there was a timing issue when setting a field's presence immediately after changing its value so I tried a configuration where I had two numeric fields: One field receives a number entered by the user while the other has a Calculate script on it which hides itself if the first field's value is zero or less and shows itself along with the value of the field field multiplied by 10.
    This is the JavaScript I used on the "10 product" field:
    if (NumericField4.rawValue > 0)
    this.presence = "visible";
    this.rawValue = 10 * NumericField4.rawValue;
    else
    this.presence = "invisible";
    this.rawValue = 0;
    Once again, this worked as expected. But when I changed the order of the operations such that the presence was being changed
    after the value, while the presence was being set correctly, the value always remained zero (0).
    So I believe this proves that there's a bug with setting the presence after setting the value in a Calculate script where the value always remains zero (0) and this also shows that there's a simple work-around. If you're still having problems with the presence while using the suggested work-around, it's possible you're either using a version of Acrobat which is prior to 7.0.7 and has worst symptoms than this latest version or that you're either previewing or you've saved your form in a
    static PDF format.
    Thank you for pointing-out this problem. I'll report it to Acrobat. Bare in mind, however, that the Calculate event was never meant for anything more than affecting a field's value based on a calculation. Of course, I, personally, understand (and see the value in) the desire to affect much more than a field's value in the Calculate event since it runs every time the value of a field on the form changes. But since it wasn't designed for that, one should always be careful when writing complex calculation scripts such as the one you were using.
    Attached is my test form for you to try.
    Stefan
    Adobe Systems

  • Adf-Struts/JSP/BC4J- and setting date fields from jsp

    Hi,
    I'm working with the new ADF Frameworks (JDev 9.0.5.1) and ran into some questions regarding exception handling using BC4J, Struts and JSPs.
    I have a DATE column in database and an entity and VO with a datefield with type oracle.jbo.domain.Date.
    My JSP shows a textfield and the user should enter a valid date. Everything fine, until date is of wrong format or contains illegal characters...
    Problem:
    ADF tries to do a setAttribute on the datefield in VO row which expects a parameter with type oracle.jbo.domain.Date. When the user entered e.g. "NiceWeather" as date, I get an IIlegalArgumentException while converting to the correct Date format. This exception isn't thrown by bc4j as AttrValException and therefore my JSP renders a global error instead of a message directly behind the date field.
    I tried to validate the datefield in my DataForm and in my Action in the validateModelUpdates() method, but with no fitting solution.
    Any ideas how to validate a datefield with adf/struts/jsp/bc4j?
    Thanks for your help!
    Torsten.

    Torsen - In the first instance I'd recommed that you try and handle it declaritively using the Struts Validator Framework . See http://otn.oracle.com/products/jdev/howtos/10g/StrutsValidator/struts_validator_howto.html
    There is a section in there on how to use the validator with ADF databound pages and you can check the format the user enters via generated JavaScript.
    Also check out the matching sample project:
    http://otn.oracle.com/sample_code/products/jdev/10g/ADFandStrutsValidator.zip - this has a data field check on it as well

  • Dynamically set report field value

    In my old classic VB project, I was able to set a report field value using the following simple line of code.
    someReport.SomeField.SetText u201Cabcu201D
    This was nice and simple, now with crystal reports .Net I do the following:
    ((TextObject)someReport.SectionX.ReportObjects["SomeField"]).Text = u201Cabcu201D;
    Itu2019s simple enough but seems too elaborated compared to the good old VB6.
    Not that is a big deal but is there a simpler way (Classic VB6 style) to set a field on a report without me having to create my own utility method to u201Csimplifyu201D things?
    Thanks.

    Perhaps using a formula?
    Imports CrystalDecisions.CrystalReports.Engine
    Imports CrystalDecisions.Shared
    Public Class Form1
    Inherits System.Windows.Forms.Form
    Dim Report As New CrystalReport1()
    Dim FormulaFields As FormulaFieldDefinitions
    Dim FormulaField As FormulaFieldDefinition
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    FormulaFields = Report.DataDefinition.FormulaFields
    FormulaField = FormulaFields.Item(0)
    FormulaField.Text = "[formula text]"
    CrystalReportViewer1.ReportSource = Report
    End Sub
    Other than that, InProc RAS, but if the solution you have is complicated, you ain't seen nothing yet
    - Ludek

  • How to set date field in custom form to default to {NOW} plus one year.

    I am developing a subscription site. I have the custom form for inputing a users information. I have the subscribe date set up as a default field of {NOW} that works great.
    Now I need the renewal field to default to exactly one year from the subscribe date.
    Any help would definitely be appreciated.
    thanks in advance

    PHP? http://us2.php.net/manual/en/function.date-modify.php
    Alec Fehl, MCSE, A+, ACE, ACI
    Adobe Community Expert
    AUTHOR:
    Microsoft Office 2007 PowerPoint: Comprehensive Course (Labyrinth
    Publications)
    Welcome to Web Design and HTML (Labyrinth Publications)
    CO-AUTHOR:
    Microsoft Office 2007: Essentials (Labyrinth Publications)
    Computer Concepts and Vista (Labyrinth Publications)
    Mike Meyers' A+ Guide to Managing and Troubleshooting PCs (McGraw-Hill)
    Internet Systems and Applications (EMC Paradigm)

  • Set Date field value through Form datasource

    Hello all,
    Has anyone set the value of a field of type Date through the form's datasource?
        If (Not Entrega = Nothing And NrDias > 0) Then
            Entrega = Entrega.AddDays(NrDias)
            ds.SetValue("U_data", ds.Offset, Entrega)
        End If
    End If
    If I change the field to a text field it write to the datasource and display no problem.
    Any ideias?
    Best regards.

    Ups,
    Found it.
    ds.setValue("U_dataent", 0, Entrega.ToString("yyyyMMdd"))

  • Setting Data Field of Combo Box

    I have a result set passed back as an Array. I want to set
    and reference a combo box with those values
    The first element in the array should be the data, the second
    should be the label
    I can get the label set, but i Cannot get and set the "data"
    the actually selected value.
    For example: my function is
    public function onResult_getSkillsetNames( result : Array ) :
    void
    skillsetName_cmb.dataProvider = result;
    skillsetName_cmb.labelField = "skillsetName";
    skillsetName_cmb.selectedItem = result[0];
    skillsetName_cmb.text = result[1];
    //skillsetName_cmb= results[0];

    Look this post.
    Combo Box dataField
    Support
    This may help you if you want to select another index than
    the index of the dataprovider.
    Best

  • Set Date field in Command

    Afternoon. I was trying to use a date parameter in the select statement in the command screen but can't get the syntax to work. I've tried various combinations (with and without brackets and parenthesis) of the code below.
    WHERE 
    ("nvactns"."StartDate" = "#01.12.2008#")

    Yes thanks I know where to create the command but youu2019ve drawn my attention to the create parameter section in Add Command which I will find useful in future. Below is the Select statement which works perfectly
    SELECT "NVAPR"."CaseFullRef","NVAPR"."Systemkey" AS APRSYS,"NVActns"."Systemkey" AS ACTSYS , "nvenqtyp"."Description", "NVActnsL"."Code" AS ACode, "NVApNoTy"."Code" AS CCode, "nvenqtyp"."Code" AS ECode, "NVAPR"."StartDate"AS CseStart, "NVAPR"."CaseType", "NVActns"."StartDate" AS ActStart, "NVAPR"."FirstRespTgt", "NVActnsL"."CodeStatus", "NVTresOf"."Code" AS OCode, NVTRESOF.Description AS Officer
    FROM   (((("NVCORE"."dbo"."NVAPR" "NVAPR" LEFT OUTER JOIN "NVCORE"."dbo"."NVApNoTy" "NVApNoTy" ON "NVAPR"."CaseType"="NVApNoTy"."LookupKey") LEFT OUTER JOIN "NVCORE"."dbo"."NVTresOf" "NVTresOf" ON "NVAPR"."CaseOfficer"="NVTresOf"."LookupKey") LEFT OUTER JOIN "NVCORE"."dbo"."nvenqtyp" "nvenqtyp" ON "NVAPR"."EnquiryType"="nvenqtyp"."LookupKey") LEFT OUTER JOIN "NVCORE"."dbo"."NVActns" "NVActns" ON "NVAPR"."SystemKey"="NVActns"."SystemKey") LEFT OUTER JOIN "NVCORE"."dbo"."NVActnsL" "NVActnsL" ON "NVActns"."Action"="NVActnsL"."LookupKey"
    WHERE 
    ("NVAPR"."CaseType"=107 ) AND ("NVApNoTy"."Code"='AVIA' )
    What I need is to add another criterion  to this statement to bring any action with a particular start date.  Ultimately Iu2019d like to bring out the minimum start date but I thought Iu2019d start with this so I can understand the process of using dates in a where statement
    So I added this
    And ("nvactns"."StartDate" = u201C#01.12.2008#u201D)
    And then this
    And ("nvactns"."StartDate" = #01.12.2008#)
    But neither work.

  • Problem in date field

    Hello All,
    I have a form which has several date fields.I want to autopopulate these dates to the current date unless and until the user changes it. For ex: We have a DateField 1: When the form opens it shows today's date. If the user does not change this date and if the form is again opened 2 days after,then it shows today's date instead of showing the date which is 2 days after.
    Thanks.
    Bibhu.

    Hi Bibhu,
    There are two problems trying to implement this:
    Preventing the script that calculates the current date, from firing when the form is reopened. This script is probably in the docReady event of the current date field.
    If the form is reopened and the user enters with the field that has the script to set the form data input date then this script will fire again, changing the date.
    I think your best option is to have two readOnly date fields, currentDate (visible initially) and dataInputDate (hidden). These fields would be directly aligned one on top of the other.
    Then in the field that you select as triggering the setting of the date that makes when the user input data you would hide the currentDate and show the dataInputDate. Example in the exit event
    if (this.rawValue !== null)
         currentDate.presence = "hidden";
         dataInputDate.presence = "visible";
         //... set the date for the dataInputDate
    else
         currentDate.presence = "visible";
         dataInputDate.presence = "hidden";
         dataInputDate.rawValue = null;
    Make sure the preserve script changes is ticked in the File > Form Properties > Defaults tab.
    As I say, if this field is re-entered and exited again at any stage then the script will re-fire and change the date.
    Hope that helps,
    Niall

  • Dynamic action with set value on date field

    Hi,
    I'm using APEX 4.02
    I'm trying to calculate the age based on the date of birth dynamically on a form. I'm trying to do this with a (advanced)dynamic action with set value.
    I'm able to get this kind of action working based on a number field etc, but NEVER on a date field.
    I've read all posts on this subject but so far no solution. Even if I try to simply copy the value over to another date field or typecast it to a string ( to_char function ) it does not work. So for me the problem seems to be in the source field being a date field.
    I've tried using the source value as is in a select statement :
    select :P33_GEBOORTEDATUM from dual;
    and also type casted based on the date format :
    select TO_DATE(:P33_GEBOORTEDATUM,'DD-MON-YYYY') from dual
    but still no luck.
    On the same form I don't have any issues as long as the calculation is based on number fields, but as soon as I start using dates all goes wrong.
    Any suggestions would be greatly appreciated. If you need any extra info just let me know.
    Cheers
    Bas
    b.t.w My application default date format is DD-MON-YYYY, maybe this has something to do with the issue .... ?
    Edited by: user3338841 on 3-apr-2011 7:33

    Hi,
    Create a dynamic action named "set age" with following values.
    Event: Change
    Selection Type: Item(s)
    Item(s): P1_DATE_OF_BIRTH
    Action: Set value
    Fire on page load: TRUE
    Set Type: PL/SQL Expression
    PL/SQL Expression: ROUND( (SYSDATE - :P1_DATE_OF_BIRTH)/365.24,0)
    Page items to submit: P1_DATE_OF_BIRTH
    Selection Type: Item(s)
    Item(s): P1_AGE
    Regards,
    Kartik Patel
    http://patelkartik.blogspot.com/
    http://apex.oracle.com/pls/apex/f?p=9904351712:1

  • How do I set the value of a dynamic row text field

    I have a repeated row form which contains a button and multiple text fields.  There is a text field (Input Data Field) further up with some information I want to place in the table and multiple buttons that I want to read the value of and set to the table.  I apologize there are multiple questions I have and I am using pseudocode to describe it.
    Top form looks like
    InputField
    | ButtonX1 | ButtonY1 | DescriptionX1 (read only Text Field)
    | ButtonXn | ButtonY1 | DescriptionXn
    OutputRow looks like
    | ButtonOutput | OutputField1 | OutputField2 | OutputField3 |
    So I would like it to do
    ButtonX1.click
    OutputTable.OutputRow.addInstance(true)  //this works - everything else I have questions on
    OutputTable.OutputRow.OutputField1.rawValue = DescriptionX1.rawValue
    Question 1
    How do I address the location in each table to set a value
    Question 2
    How do I get the value of the description field in the same table and row as the button
    I would like to say something to the effect of  OutputTable.OutputRow[??].OutputField1.rawValue = this.parent.DescriptionX
    OutputTable.OutputRow.OutputField2 = InputField.rawValue
      Same question as above - how do I specify a dynamic row - is this the proper syntax for getting the value from the input field?
    OutputTable.OutputRow.OutputField3 = this.ButtonLabel
    Question 3
      How can I get the value of the button's label to set in the field
      There should be very many of these buttons and buttons will be added - I would prefer to set the value based on the button's label to make the value easier - not requiring changing the code
    Question 4 - unrelated to those above.
    Is it possible to build the first table
    | ButtonX | ButtonY | Description |
    from an XML File.  I have seen examples of how to build if it is just data, but can the XML be pushed into a form with code to do the above actions?

    Each object in a form must have a unique name. I doing so it is not neccessarily the name but the path or SomExpression associated with that object that must be unique. In your case you have a Table.Row.object configuration. The Row is the part that is repeating so to give each object a unique name an instance number is placed on the repeating part. So objects in the 1st row woudl be Table.Row[0].object...objects in the second row woudl be Table.Row[1].object etc .....You can see this by adding a debug instruction on the Enter event of the description field. Put the code app.alert(this.somExpression) and when you enter the field you will see what the somExpression is. Do this for a few rows and you will see the pattern (don't forget to remove the debug code from the enter event). Now you know what you have to use to address the fields. If no instance is given it is assumed to be 0 ..that is why only the 1st row is being affected.
    So now to answer your questions:
    Question1: The square bracket notation is an issue for javascript (this is the notation for an array) so we have to use a different means of addressing the field to include the instance number. So to address the Description in the 3rd row we woudl use:
    xfa.resolveNode("Table.Row[2].Description").rawValue = "This is my new description";
    Note that the instance number is 2 for the 3rd row because the instance numbers are 0 based.
    Question2. The resolveNode notation allows you to pass a string so you can also concatinate expressions to make the string. If you are writing code on a button in the same row you can get the instance that you are on by using the expression this.parent.index. The "this" portion refers to the current object (the button) and the parent.index gets you th eindex of the Buttons parent. If the button is embedded deeper in a hierarchy then you can continue to add parent indicators until you get back to the node that you want. So rewriting your expression from Q1 it woudl be:
    xfa.resolveNode("Table.Row[" + this.parent.index + "].Description").rawValue = "This is my new description";
    Question3: The buttons caption can be retrieved by using ButtonName.caption.value.text.value
    Question4: When you say build from an XML file. What are you expecting to come from the XML file? The caption that goes on the button? Typically the XML file carries data (not to say that it cannot carry other things). Just need a bit of clarification on this one first.
    Hope that helps
    Paul

  • WD_BADI_DOMODIFYVIEW - dynamically set screen element as mandatory field

    Hi,
    I would like to use WD_BADI_DOMODIFYVIEW to dynamically set a standard screen element on my Webdynpro as a mandatory field. Does anyone know which method in which class that I can use to set the status from 'Normal field' to 'required' ?
    This is a for standard SRM webdynpro screen. Unfortunately I could not get the configuration to set the standard metadata field as a mandatory field.
    Also this standard field does not have an existing binding to a context element to manipulate the status of the field. Hence I need to find a method that can directly change the attribute of this standard screen element to mandatory. I do not want to modify the webdynpro to change the status of the field to 'required'.
    <promise removed by moderator>
    Thanks
    Liam
    Edited by: c958209 on Apr 28, 2011 1:32 PM
    Edited by: Thomas Zloch on Apr 28, 2011 4:58 PM

    Hi Kiran,
    I think I understand what you are suggesting now. The trouble is IF_V_SC_DOFC_I_LIMITEM (the view I'm trying to enhance) does not exist in the BAdI.
    When I go to the attributes of the View of the Webdynpro component that I'm trying to enhance I do see WD_THIS refto IF_V_SC_DOFC_I_LIMITEM.
    It's just that in the BAdI WD_BADI_DOMODIFYVIEW this WD_THIS is not available and trying to define it like below does not work.
        Make Product Category field mandatory
          lo_node = wd_context->get_child_node( co_item_data ).
          lo_value = lo_node->get_element( ).
        Get value of context element SH_CATEGORY_ID
          lo_value->get_attribute( EXPORTING name  = co_sh_category_id
                                   IMPORTING value = lv_sh_category_id ).
          IF lv_sh_category_id IS INITIAL.
            DATA: lo_message_manager TYPE REF TO if_wd_message_manager.
            DATA lo_api_controller     TYPE REF TO if_wd_controller.
            DATA wd_this TYPE REF TO  if_v_sc_dofc_i_limitem.           <================ This gives a syntax error "The type          IF_V_SC_DOFC_I_LIMITEM is unknown
            lo_api_controller ?= wd_this->wd_get_api( ).
            CALL METHOD lo_api_controller->get_message_manager
              RECEIVING
                message_manager = lo_message_manager.
          Report message
            CALL METHOD lo_message_manager->report_attribute_error_message
              EXPORTING
                message_text   = 'Please fill the Document Date'
                element        = lo_value
                attribute_name = 'SH_CATEGORY_ID'.
          ENDIF.

  • Cannot add hub-managed content type with external list lookup columns to a list -- Error:Id field is not set on the external data field

    This is a variation on the issue mentioned in this
    post
    We are using SP 2010 Content Hub to manage our content types.  On the content hub we've created a couple of exteranl lists, and then created some site columns as lookups against these lists.  We then added the columns to one of our content types
    and set it to publish.
    After the publishing job executed, I tried adding the content type (which now appears on the subscriber sites) to one of the document libraries on one of the subscriber sites.  When I did that it threw the following error:
    Microsoft.SharePoint.WebControls.BusinessDataListConfigurationException: Id field is not set on the external data field    
    at Microsoft.SharePoint.SPBusinessDataField.CreateIdField(SPAddFieldOptions op)     
    at Microsoft.SharePoint.SPBusinessDataField.OnAdded(SPAddFieldOptions op)     
    at Microsoft.SharePoint.SPFieldCollection.AddFieldAsXmlInternal(String schemaXml, Boolean addToDefaultView, SPAddFieldOptions op, Boolean isMigration, Boolean fResetCTCol)     
    at Microsoft.SharePoint.SPContentType.ProvisionFieldOnList(SPField field, Boolean bRecurAllowed)     
    at Microsoft.SharePoint.SPContentType.ProvisionFieldsOnList()     
    at Microsoft.SharePoint.SPContentType.DeriveContentType(SPContentTypeCollection cts, SPContentType& ctNew)     
    at Microsoft.SharePoint.SPContentTypeCollection.AddContentTypeToList(SPContentType contentType)     
    at Microsoft.SharePoint.SPContentTypeCollection.AddContentType(SPContentType contentType, Boolean updateResourceFileProperty, Boolean checkName, Boolean setNextChildByte)     
    at Microsoft.SharePoint.SPContentTypeCollection.Add(SPContentType contentType)     
    at Microsoft.SharePoint.ApplicationPages.AddContentTypeToListPage.Update(Object o, EventArgs e)     
    at System.Web.UI.WebControls.Button.OnClick(EventArgs e)     
    at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)     
    at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)     
    at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)    b55297ed-717f-466d-8bdc-297b20344d3f
    I checked the external  content type configuration and it did specify an "id column".  Anyone know if what I am attempting to do is possible and if so, what special configurations are required?
    Thanks

    The issue is not External Content type or external list but the look up column.
    It's not possible to publish a look up column via the Content Type Hub.
    If you need to do this then an alternate way is to use a Managed Metadata column instead, otherwise you will have to implement this via a feature.
    Varun Malhotra
    =================
    If my post solves your problem could you mark the post as Answered or Vote As Helpful if my post has been helpful for you.

  • Need to Programmatically Set IRR Filter on Date Field Due to APEX 4.1 Bug

    There may be another work around but, here is the problem that we are encountering...
    We have a huge table that is partitioned on a DATE field and an IRR that reports on this table. By default, we want to show the most recent 3 days of data. There is a built-in filter for "is in the last 3 Days." Sounds Great! Unfortunately APEX generates the code using TIMESTAMP rather than DATE functions. As a result of this, the query does not perform partition pruning and, as a consequence, it is doing a full table scan which takes forever. Note the use of the "LOCALTIMESTAMP" function in the query that is generated by APEX for this filter:
    SELECT   "BUSINESS_DATE",
             COUNT ( * ) OVER () AS apxws_row_cnt
      FROM   (SELECT   *
                FROM   (SELECT   *
                          FROM   position_delta_his p) r
               WHERE   ("BUSINESS_DATE" BETWEEN *LOCALTIMESTAMP*
                                                - NUMTOYMINTERVAL (:APXWS_EXPR_1,
                                                                   'year')
                                            AND  *LOCALTIMESTAMP*)) r
    WHERE   ROWNUM <= TO_NUMBER (:APXWS_MAX_ROW_CNT)If, instead, APEX used the SYSDATE function, as the underlying column is a DATE, this returns instantly, after partition pruning.
    SELECT   "BUSINESS_DATE",
             COUNT ( * ) OVER () AS apxws_row_cnt
      FROM   (SELECT   *
                FROM   (SELECT   *
                          FROM   position_delta_his p) r
               WHERE   ("BUSINESS_DATE" BETWEEN *SYSDATE*
                                                - NUMTOYMINTERVAL (:APXWS_EXPR_1,
                                                                   'year')
                                            AND  *SYSDATE*)) r
    WHERE   ROWNUM <= TO_NUMBER (:APXWS_MAX_ROW_CNT)
    The bug is that APEX should base the underlying function on the data type of the filtered column.
    As a work around, if we create a filter where BUSINESS_DATE >= '4/13/2012' (three business days ago), again, this returns instantaneously. The issue is that we can only set this filter by using the APEX GUI. We need to be able to:
    1. Determine the date for 3 business days ago
    2. Set this as the default filter.
    I tried creating a BEFORE HEADER PL/SQL page process but, it does not appear to be having any effect. Here is that code:
    DECLARE
        ldt_Filter DATE;
        CURSOR lcsr_GetMaxBusinessDate IS
            SELECT Max(BUSINESS_DATE)
            FROM POSITION_DELTA_HIS;
        DAYS_AGO CONSTANT NUMBER := 3;       
    BEGIN
        APEX_UTIL.IR_CLEAR( :APP_PAGE_ID );
        OPEN lcsr_GetMaxBusinessDate;
        FETCH lcsr_GetMaxBusinessDate INTO ldt_Filter;
        CLOSE lcsr_GetMaxBusinessDate;
        ldt_Filter := ( Trunc( ldt_Filter ) - 3 );
        APEX_UTIL.IR_FILTER( p_page_id       => :APP_PAGE_ID,
                             p_report_column => 'BUSINESS_DATE',
                             p_operator_abbr =>'GTE',
                             p_filter_value  => TO_CHAR( ldt_Filter, 'YYYYMMDDHH24MISS' ) );
    END;Can anyone tell me:
    1. How to set this filter programmatically (also needs to be displayed on the page so the user can see the current filter...as if it were created via the GUI) ***OR***
    2. Some other work around for this issue..
    Thanks,
    -Joe

    Actually, now that I look further, I don't think it is going to work to simply set the filter programmatically. The end user can still click the column heading where they are only given the choice of the LOCALTIMESTAMP based filters. If they pick one, the page is going to be out to lunch for them.
    We really need some other fix. We really need a way to actually address the underlying issue.
    -Joe

Maybe you are looking for

  • Update data from a view

    Hi, trying to update data from a view with: - Company (table) - Products (table) In a form, the user wants to update e.g: both products.product_name and Company.company_name. Is there a way to update a view records built on 2 tables ? Any idea will b

  • All apps gone after forced restart of iPad

    Hello, I was just developing a bit with my iPad and after the debugger got hang I had to restart my iPad by holding down the home button and the lock button for some seconds. After the iPad was booted up again, i noticed that all apps (expect the bui

  • Bug when using Sequencer.setTickPosition() ?

    HI, I created a Track and added a few ControlChange events in ticks 0,96,192,288,384. This corresponds to beat indicators in a resolution of 96 (PPQ). I set the sequencer for a loop, starting at tick 0, and ending at tick 384. While the sequencer is

  • RAC and Shared Storage

    Hi, I am trying to build a two-node RAC on windows 2003. I have two nodes, RAC1 and RAC2. I have completed the network configuration and now intend to implement shared storage. On RAC1, i have two hard disks. Is it possible if I create 5 logial parti

  • Opening old files in Logicpro 8

    Hi I have just started working with LogicPro 8 (on my MacbookPro- 10.5) and I have a lot of midi-flies created in Logic 2.6 and 3 and 4.5, which I now need to open in Logic 8. But when opening the old files, I am told that I need to open them in Logi